get请求的headers中没有content-type这个字段,get请求的参数在url的?后面,请求参数是Query String Parameters;
Spring MVC使用注解:@RequestParam来接受参数
我们目前常见的post请求的content-type有以下两种
Content-Type: application/x-www-form-urlencoded
Content-Type: application/json
其中 application/x-www-form-urlencoded 可以理解为查询字符串,只不过是放在请求体的body中,不会显示出来,请求参数会在From Data中
Spring MVC使用注解:@RequestParam来接受参数
而Content-Type:application/json,请求的参数会显示在Request Payload中,请求参数的格式是json。
在Spring MVC中使用@requestbody接收