post请求地址栏上的参数和body中的参数相同怎么取?
当在使用 post 请求 x-www-urlencoded
请求时,不传表单参数,只有url 地址栏上有参数,发现没有 content-type
这个属性,偶然发现有这个问题,不知道为什么要这样设计?
言归正传,当我用post请求时,地址栏上参数和表单中的属性字段相同时,spring boot后台接收的是哪个参数?
curl --location 'http://localhost:9999/user/post?id=13' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=1'
返回结果返回的是地址栏上的属性参数值,以后要注意啦!!