[Shallow learning] POST, GET, PUT, DELETE request

HTTP defines different ways to interact with the server, the most basic is POST, GET, PUT, DELETE , and its essential than URL stands for resource descriptors , we can interpret it this way:

url describes a network resource, and the post, get, put, delete this resource is to add, delete, change, check operation!

 

GET request :
Will be issued to obtain the requested data to the database, thereby to obtain information, the request as a database of select operations like just to inquire about the data , not modify, add data , will not affect the content of the resource that the request does not side effects.
No matter how many times the operation, the result is the same.
 
PUT request :
Is sending data to the server, thereby changing the information, the request as database update operations as to modify the contents of the data, but does not increase the type of data , etc., which means that no matter how many times PUT operation, and the results It is no different.

POST request :
PUT requests with similar, are sending data to the server, but the request will change the kind of data and other resources, like database insert operation, as will create new content . Almost all current operations are submitted with the POST request.
 
 
DELETE request:
As the name suggests, is used to delete a resource, the request as database delete operations.
 
 
 
 
 

Guess you like

Origin www.cnblogs.com/wang615/p/12047651.html