One, HTTP requests (describe only get and post requests)
1, GET request: Directly display the parameter name and value in the URL, the request length is limited
For example, request userid=1 user information, url:http://hostname/getuser?userid=1
2. Post request: The data is placed in the body for transmission, so the requested parameters are not exposed in the URL. The data for the post request can be very large and may modify resources on the server. The POST request requires tools such as Postman
1) Uploading Files
2) Transfer JSON data type: Select Body-raw to change the last option text to JSON
3, the common status code: Web server HTTP response status of 3-digit code
1) 200:2 indicates that the request was sent successfully. 200 indicates that the request was sent successfully and the server returned
2) 302:3 indicates a redirect. 302 indicates that the requested resource is now temporarily responding to requests from different URIs. For example, open my Blog link, when my blog has been deleted, automatically jump to the blog home page
3) 400:400 indicates that the request sent by the client is not error-able. 403 means no access; 404 means the page visited does not exist
4) 500:5 indicates that the server has an exception. 500 indicates server internal exception, 504 indicates server timeout, no result returned
Second, Postman Analog HTTP request
1. Add header File
For example, get user information, http://hostname/getuser2?userid=1, and need to add header,Content-type:application/json
2. Add Cookie Verification
For example, modify the user balance: Http://hostname/setmoney2, need to add Cookie,token is written dead token12345
Postman Analog HTTP Requests