如何使用 Postman 将 XML 数据发布到网络服务?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47295675/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I POST XML data to a webservice with Postman?
提问by Stevoisiak
I want POST an XML request to a webservice using Postman. However, when I check the available request formats, I only see options for form-data, x-www-form-urlencoded, raw, and binary.
我想使用 Postman 向 Web 服务 POST 一个 XML 请求。然而,当我检查可用的请求的格式,我只看到了选项form-data,x-www-form-urlencoded,raw,和binary。
How do I POST an XML request to a webservice with Postman?
如何使用 Postman 向 Web 服务发布 XML 请求?
回答by Stevoisiak
Send XML requests with the rawdata type, then set the Content-Type to text/xml.
使用raw数据类型发送 XML 请求,然后将 Content-Type 设置为text/xml。
After creating a request, use the dropdown to change the request type to POST.
Open the Bodytab and check the data type for raw.
Open the Content-Type selection box that appears to the right and select either XML (application/xml)or XML (text/xml)
Enter your raw XML data into the input field below
Click Sendto submit your XML Request to the specified server.


