HTTP 415问题

来源:互联网 发布:天书世界圣物突破数据 编辑:程序博客网 时间:2024/06/06 07:06

 HTTP 415:The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.

解决办法:

I bet that call from Postman does not include Content-Type: application/json.

HTTP 415 means that the server does not understand the media format of the request. In your controller you are specifying it accepts JSON, but you have not said if the request indicated that the body is in that format. Just because you put the data in JSON format, does not mean that the server is going to recognize it, you have to indicate it in the Content-Type header.

0 0
原创粉丝点击