First, we open Postman
and select Collections.
Click the plus sign above to pull out a project
, then right-click on the project and select Add request to create a request.
Then we need to enter our own request address. Here mine is http://localhost:8080/user/getName
Then I chose post for the previous request type,
and then for the parameter passing method below
Body,
we choose the parameter type next to
raw , we choose json, and then enter our own json format in the text field below.
{
"键": "值",
"name": "测试数据"
}
Maybe most people, like me, don’t know that keys need to be enclosed in double quotes, which leads to difficulties