1. There are several main methods of request:
Verb |
Description |
HEAD |
Gets only the header information of a resource, metadata. For example, just want to know the size of a file, the modification date of a resource, etc. |
GET |
Get resources, one or more |
POST |
Create a resource |
PATCH |
Updates a partial property of a resource. Update resources on the server (client provides changed properties) |
PUT |
Replace the resource, and the client needs to provide all the properties of the new resource. If the new content is empty, set to Content-Length 0 to differentiate the error message |
DELETE |
Delete a resource |
Where get POST is more commonly used for focus needs to be mastered.
2. Status Code
HTTP status Code classification
category |
Category Description |
1** |
Information, the server receives the request and requires the requestor to continue the operation |
2** |
Successful, the operation is successfully received and processed |
3** |
Redirect, requires further action to complete the request |
4** |
Client error, request contains syntax error or cannot complete request |
5** |
Server error, the server has an error while processing the request |
For more details, refer to the following links:
Http://www.runoob.com/http/http-status-codes.html
One of requests: HTTP request Status Code