问题
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