一、@RequestParam
注解@RequestParam修饰的变量,在postman中是以Params的形式传递,如下图,name,password,force分别被注解@RequestParam修饰。
URL的显示如下:http://192.168.1.107:8001/api/v29+/auth?name=admin&password=123456&force=1
请求例子:
curl -X GET "http://host:port/api/v29+/auth?
name=admin&password=123456&force=1" -H "accept: application/json"
二、@RequestBody
注解@RequestBody修饰的变量,在postman中是以Body的形式传递
URL的显示如下:http://192.168.1.107:8001/api/v29+/ws/forwarder
请求例子:
curl -X PUT "http://host:port/api/v29+/ws/forwarder" -H "accept:
application/json" -H "Content-Type: application/json" -d "{ \"company\":
\"BL\", \"actioncode\": \"c2ls_get_server_terminals_status\", \"token\":
\"\", \"data\": {}, \"return\": 0, \"return_message\": \"\" }"