标签: json playframework functional-testing
我有以下代码来发出json请求,但它失败了:
Response response = POST("/b/profile/","application/json",body);
我也试过这个:
Response response = POST("/b/profile/","application/x-www-form-urlencoded",body);
但是响应再次具有内容类型text/html。有什么想法吗?
text/html
答案 0 :(得分:0)
尝试
Response response = POST("/b/profile/","text/javascript",body);
有关详细信息,请参阅here