问题描述:
请求服务端接口但是传参未收到;
解决:
使用post请求body数据格式为x-www-form-urlencoded向服务端发起请求 请求成功
但服务端未接收到数据
原因是没加@RequestParam注解
@RequestParam用来处理 Content-Type 为 application/x-www-form-urlencoded 编码的内容,Content-Type默认为该属性。
加上@RequestParam后调用 就能接收到值了
微信扫一扫
问题描述:
请求服务端接口但是传参未收到;
解决:
使用post请求body数据格式为x-www-form-urlencoded向服务端发起请求 请求成功
但服务端未接收到数据
原因是没加@RequestParam注解
@RequestParam用来处理 Content-Type 为 application/x-www-form-urlencoded 编码的内容,Content-Type默认为该属性。
加上@RequestParam后调用 就能接收到值了
相关推荐