如何使用 Postman 将 XML 数据发布到网络服务? [英] How do I POST XML data to a webservice with Postman?

查看:26
本文介绍了如何使用 Postman 将 XML 数据发布到网络服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Postman 向 Web 服务 POST 一个 XML 请求.但是,当我检查可用的请求格式时,我只看到 form-datax-www-form-urlencodedraw 的选项,和二进制.

如何使用 Postman 向网络服务发布 XML 请求?

解决方案

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

<小时>

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

  2. 打开正文标签并检查原始的数据类型.

  3. 打开出现在右侧的 Content-Type 选择框并选择 XML (application/xml)XML (text/xml)

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

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

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.

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

解决方案

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


  1. After creating a request, use the dropdown to change the request type to POST.

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

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

  4. Enter your raw XML data into the input field below

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

这篇关于如何使用 Postman 将 XML 数据发布到网络服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆