【发布时间】:2013-02-25 17:30:52
【问题描述】:
我在 firefox 网络浏览器中使用 Rest Client 插件。我想测试一个处理 HTTP POST 请求和消耗 json。如何使用 Rest Client 对其进行测试?
如果我将 json 放入 请求正文,我会收到 *HTTP 415 Unsupported Media Type 错误*。
这样做的正确方法是什么?
【问题讨论】:
标签: http post rest-client
我在 firefox 网络浏览器中使用 Rest Client 插件。我想测试一个处理 HTTP POST 请求和消耗 json。如何使用 Rest Client 对其进行测试?
如果我将 json 放入 请求正文,我会收到 *HTTP 415 Unsupported Media Type 错误*。
这样做的正确方法是什么?
【问题讨论】:
标签: http post rest-client
如果没有添加标题 'Content-Type': 'application/json',我曾经遇到过这个问题。 另请参阅POST JSON fails with 415 Unsupported media type, Spring 3 mvc,大致相同。
【讨论】: