“客户端发送的请求在语法上是不正确的." -内容类型错误 [英] "The request sent by the client was syntactically incorrect." -- bad Content-Type

查看:80
本文介绍了“客户端发送的请求在语法上是不正确的." -内容类型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在向JAX-RS REST服务器发送一些测试请求时,我得到了一个

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.

请求是

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

推荐答案

Content-Type: text-plain

是一个错字和错误的MIME类型.应该是

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.

这篇关于“客户端发送的请求在语法上是不正确的." -内容类型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆