“The request sent by the client was syntactically incorrect.” — bad Content-Type

走远了吗. 提交于 2019-12-25 16:46:24

问题


While sending some test requests to a JAX-RS REST server, I got back a

400 - Bad Request
The request sent by the client was syntactically incorrect.

The request was

PUT http://localhost:8080/some/url
Content-Type: text-plain
foo

回答1:


Content-Type: text-plain

is a typo and a bad MIME type. It should be

Content-type: text/plain

This was a bit of a head-scratcher for a while.



来源:https://stackoverflow.com/questions/27929825/the-request-sent-by-the-client-was-syntactically-incorrect-bad-content-typ

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!