[英]Spring - wrong encoding POST request with x-www-form-urlencoded
I'm trying build an app that takes a POST(with x-www-form-urlencoded header) with one parameter.我正在尝试构建一个带有一个参数的 POST(带有 x-www-form-urlencoded 标头)的应用程序。 This is my POST method code:
这是我的 POST 方法代码:
@RequestMapping(value = "/translate", method = RequestMethod.POST)
public String getTranslate(@RequestParam("text") String text) {
//................
}
When i do POST request by Postman with data "Let's measure"(image below) in method getTranslate text value is "Letâs measure".当我在方法 getTranslate 中使用数据“让我们测量”(下图)由邮递员发出 POST 请求时,文本值为“让我们测量”。 What am I doing wrong?
我究竟做错了什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.