Interface test tool -Postman use details

1. Install Postman

Official website to download address: www.postman.com/downloads/

Select the corresponding version to download, download directly after the installation.

2. Postman interface description

 

 

POSTMAN interface request method

  •  
GET request: click Params, input parameters and value, you can enter more than one,Copy the code

Response example: Displays the response status code of the request, response time, and response file size

Example of response body: The response format can be varied. In this case, the request is made by Baidu, so the response is in HTML format. Generally, the response body of the customized interface is in JSON format

  •  
  •  
POST request POST request 1: Submit the formCopy the code

The following example sets the request method, request URL, and request parameters, but does not set the request header. The request header is automatically generated based on the form of the request parameters

There is a correlation between the content-Type in the request header and the format of the request parameters, for example:

In the following figure, if we select JSON(Application /json), the headers will be automatically set to Application/JSON

POST request 3: XML submission

POST request 4: Binary file submission

Other request methods, such as PUT and DELETE, have the same general process as GET and POST, which are not illustrated here

4. Manage the use case – Collections

Collections: Multiple interface requests can be grouped together and managed, and a Collection can be created for the same project so that interfaces can be easily found and processed uniformly.



Click the + sign icon in the image above, enter Name: “ABC”, Description: “Sample Demo”, and click the Create button to Create a collection. The second step is to add requests to Collections

After all the data for the interface request is ready and validated on the right, click the Save button.

Once you’ve saved it, you can see it here, and when you want to call it again, you can click here

Collections management is refined, where we group requests for different types and add subfolders