HTTP Request Methods | HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. These method names are case sensitive and must be used in uppercase. They are:-
Different HTTP Request Methods
It is the default request method, designed to get data from the server by generating requests without data or with a limited amount of data (maximum of 2kb to 8 kb).
It can send requests with an unlimited amount of data and gathers data from the server as a response. The response of GET-based or POST-based requests contains everything including response body like response headers, miscellaneous information, and e.t.c.
It is the same as the GET but the HEAD-based request-related response doesn’t contain a response body. HEAD-based requests are useful to test whether a web component is present or not.
This is capable of allowing the client to place a new file or web component in an already deployed web application of the webserver. In real projects, after placing a web application in the webserver of an ISP (Internet Service Providers) machine we use FTP (File Transfer Protocol) application from our computers to maintain that web application. This FTP application uses PUT method requests to add a new file or new web resource component to that ISP machine website.
It allows a client to send a request having the capability to delete a file or web component of a web application in the server. FTP application uses this delete method to delete web pages or documents or anything from the hosted web application of the ISP machine based web server.
This trace method request returns all the debugging messages and flow of execution details regarding the request and response of certain web components.
The options method-based request given to the web resource component determines which HTTP request methods that web component can request from the client. For example:- If the servlet component overrides doGet(-,-) method then the OPTIONS method based request given to the servlet component returns the following response Allow: HEAD, GET, OPTIONS, TRACE.
It establishes a tunnel to the server identified by a given URI.
Important Points on HTTP request methods
- POST and PUT request methods are non-idempotent, except all are idempotent.
- Using browser software we can send only GET or POST method requests.
- The hyperlink can generate only GET method requests whereas form pages can generate GET or POST method requests.
- PUT and DELETE and other HTTP request methods (except the GET and POST) will be utilized only in the FTP application development which can be used in the hosting and maintenance of the web application.