问题描述
我正在使用 List REST API 来加载派对数据.使用以下详细信息:
I am using List REST API for loading Party data. Using the details below:
Request type : POST
URL : http://localhost:1512/rest/V1.0/list/Party
Authorization : Yes
Header : No Header information
Body : form Data ->xml file.
当我发送请求时,我收到以下错误.你能帮帮我吗?
When I send request I am getting below error. Can you please help me.
http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
Error 415 Unsupported Media Type
推荐答案
您需要在您的发布请求中包含一个标头.在 Postman 的 headers 下添加一个值,以包含 Content-Type
的键,其值为 application/xml
.您可能还想尝试 text/xml
的值,具体取决于您的正文内容.
You will need to include a header in your post request. Add a value under headers in Postman to include a key for Content-Type
with a value of application/xml
. You may also want to try a value of text/xml
depending on what your body content is.
这是一个链接 了解 text/xml 和 application/xml 之间的区别.
Here's a link for info on the difference between text/xml and application/xml.
这篇关于从邮递员执行列表 REST API 时出现错误 415 Unsupported Media Type的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!