功能测试中无法将content-type设置为Json
我有以下代码来发出 json 请求,但失败了:
Response response = POST("/b/profile/","application/json",body);
我也尝试了这个:
Response response = POST("/b/profile/","application/x-www-form-urlencoded",body);
但响应再次具有内容类型 text/html
。有什么想法吗?
I have the following code to make a json request, but it fails:
Response response = POST("/b/profile/","application/json",body);
I also tried this one:
Response response = POST("/b/profile/","application/x-www-form-urlencoded",body);
but the response again had the content-type text/html
. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请尝试
参阅此处了解更多详细信息
Try
See here for more details