HTTP Methods
1. GET
· It is used at the time of retrieving the data from the server.
· It is safe and idempotent
· Idempotent means at the time of first request and after any number of request the data or the output will be the same.
· It doesn't have the body.
· We can send only the character data or String data we can’t send the binary data, because the request doesn’t have the body.
· Only through URI we can send the data
· Bookmarking is possible (because complete information will be there in URI only)
· Limited amount of data only we can send till 2kb data only.
· Less security
· Caching of the data is possible only with the GET REQUEST
2. PUT
· It is used for either updating or creating the data.
· While sending the put request it is mandatory to send the identity of the resource.
· It is also a safe and idempotent.
· While sending the put request we can send the data in 3 ways
1. Query parameter
2. Uri
3. Request body.
· The put request will be having the request body. So we can also send the binary data.
3. POST
· It is used for updating or creating but recommended to use for updating only.
· It is not a safe and it is non-idempotent.
· While sending the post request the end user no need to send the identity of the resource. So the Server treats that every post request is new request only.
· While sending the put request we can send the data in 3 ways
1. Query parameter
2. Uri
3. Request body.
· It will be having the request body, so we can send any data i.e. character and binary also
4. DELETE
· It is used for deleting the resources from the server.
· It is also safe and idempotent http method.
· While sending the delete request the end user must and should send the identity of the resource.
5. OPTION
6. TRACE
7. HEAD
8. CONNECT
No comments:
Post a Comment