HTTP(Hypertext transfer protocol) it is a protocol used by world wide web for exchanging the data between each other or you can say in between servers & clients.
Safe Method: - It is a method which only retrieves the data from the server and does not modify the server state.
Idempotent Method: - It is a method which produces the same result whenever called once or multiple times.
1) GET: - With the help of this http method you can get the data from the server which is already present on the server. Get method is safe and idempotent in nature, means after hitting multiple requests to the server every time it will provide same result to the user.
2) POST: - With the help of this http method you can create a record on the server. The Post method is not idempotent in nature, means multiple requests for the same resource can result in different state on the server.
3) PUT: - This method is used to update the data on the server, it is idempotent in nature, means after hitting multiple requests to the server every time it will provide same result to the user.
4) PATCH: - This methos is used to update date on the server partially. It is not idempotent.
5) DELETE: - This methos is used to delete data on the server. It is idempotent in nature, means after hitting multiple requests to the server every time it will provide the same result to the user.
6) HEAD: - Working of this method is similar to GET method, but it will retrieve only headers of the resource, not body. The HEAD method is useful for checking the existence of a resource and it’s properties without retrieving the entire resource.
7) OPTIONS: - This is used to retrieve the list of HTTP methods supported by the resource. Server responds with list of methods in the allow the header of response.
8) TRACE: - This method performs diagnostic test by returning the full request received by the server. It is mainly used for debugging & troubleshooting purposes.