1. Download and install Postman
2. The basic function of the interface is introduced:
3. Interface layout structure modification (left and right layout-up and down layout):
In the upper left corner of file--settongs, set up:
4. Interface Request Flow:
4.1GET Request:
1 GET Request 2 GET Request: Click on the params, input parameters and value, you can enter multiple, instantly displayed on the URL link, 3 Therefore, the request header of the GET request and the request parameter, such as no special declaration in the interface document, can be filled out.
Response Example: This will have the requested response status, response time, and response size
Response Body Example: The response format can have a variety of, in general, we customize the interface is the JSON format of the response body;
4.2 Post Request:
1 POST request one: Form submission
2 Set Request method, request URL, request parameter, request header (automatically generated according to request parameters)
3 The Content-type in the request header is associated with the format of the request parameter, for example:
Body Settings:
Headers auto-generated request headers:
1 POST request two: JSON commit
1 POST request three: XML format submission Request
1 POST request 4:2 binary file submission request
5.postman: Simulate sending a request that requires cookie authentication (Chrome plugin postman)
(1) Chrome has the plugin intercept installed.
A request with a cookie is not issued due to Chrome security restrictions. If you want to send a request with a cookie, you need to turn on interceptor.
(2) Chrome browser to be set open, the browser will be open during the run.
(3) Check the cookie value and copy it to postman via the F12 debugging tool that comes with Google Chrome:
(4) Click Send to get the returned parameters;
postman--Interface Test Tool