What are the HTTP request methods, among which are GET
, POST
and DELETE
? Why should each of them be used, and what is the difference between them?
What are the HTTP request methods, among which are GET
, POST
and DELETE
? Why should each of them be used, and what is the difference between them?
Basically, if this is what I understood, there are 8 types of methods of which:
GET, POST, DELETE, PUT, CONNECT, HEAD, TRACE, OPTIONS.
GET : Method that requests some resource or object to the server
HEAD : Request information from a particular object without it being sent to the client just to test the validity of the last access.
POST : Method used to send file / data or HTML form to server.
OPTIONS : Through this method the client gets the properties of the server.
DELETE : Informs the URL of the object to be deleted.
TRACE : To send loopback type message to test.
PUT : Accepts to create or modify some object of the server.
CONNECT : Communicate with Proxy Servers.
Sources: link
GET
, POST
, PUT
, DELETE
are heavily used in web projects API
and represent CRUD
operations commonly used in databases.