[英]Spring application/x-www-form-urlencoded prevent encoding of string
[英]Spring - wrong encoding POST request with x-www-form-urlencoded
我正在尝试构建一个带有一个参数的 POST(带有 x-www-form-urlencoded 标头)的应用程序。 这是我的 POST 方法代码:
@RequestMapping(value = "/translate", method = RequestMethod.POST)
public String getTranslate(@RequestParam("text") String text) {
//................
}
当我在方法 getTranslate 中使用数据“让我们测量”(下图)由邮递员发出 POST 请求时,文本值为“让我们测量”。 我究竟做错了什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.