如何使用 Postman 将 XML 数据发布到 Web 服务?如何使用、数据、XML、Postman

2023-09-07 10:20:46 作者:岳母求发货

我想使用 Postman 将 XML 请求发布到 Web 服务.但是,当我检查可用的请求格式时,我只看到 form-datax-www-form-urlencodedraw、和二进制.

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 将 XML 请求发布到 Web 服务?

How do I POST an XML request to a webservice with Postman?

推荐答案

发送 raw 数据类型的 XML 请求,然后将 Content-Type 设置为 text/xml.

Send XML requests with the raw data type, then set the Content-Type to text/xml.

创建请求后,使用下拉菜单将请求类型更改为 POST.

打开 Body 标签并检查 raw 的数据类型.

Open the Body tab and check the data type for raw.

打开右侧显示的 Content-Type 选择框,然后选择 XML (application/xml) 或 XML (text/xml)

Open the Content-Type selection box that appears to the right and select either XML (application/xml) or XML (text/xml)

在下面的输入字段中输入您的原始 XML 数据

Enter your raw XML data into the input field below

点击发送,将您的 XML 请求提交到指定的服务器.

Click Send to submit your XML Request to the specified server.