Enter the request Url:http://127.0.0.1:8081/getmoney in the address bar
Select the "POST" method,
Add Key:content-type in "headers", Value:application/json
Click "Body", "raw" and set as JSON
Add to:
{"userid": 1}
Click Send To
The main postman of this article is the JSON structure of the operating instructions
This article takes order shipment as an example, according to the interface document to design the user to place the single interface field there are two ways to pass the field JSON data: The interface field rule:
- The interface is the POST request mode, the input JSON data structure is entered directly in the body of the postman in the Form-data
2, in the body, raw in the input JSON data structure, but this method I did not call success (may be our structure definition and write a little difference, follow-up asked to develop, pending research)
- First, in headers, set Content-type to Applicationon/json,
- Then in the body, select Raw, write the JSON data structure,
- In JSON, multiple data structures are written and nested
3, we can use JSON to translate the JSON data we wrote is correct, the link address is: http://json.cn/
There are pictures to see, just write the JSON statement is no problem, but the data after the request is not correct, this first set aside this problem, follow-up study, Welcome to solve!
Postman sending a POST request in JSON format