
What is HTTP?
Hypertext Transfer Protocol (HTTP) is a protocol designed to enable communication between clients and servers. HTTP works as a request-response protocol between a client and a server.
While the web browser acts as the client, the application on the server hosting the website acts as the server.
Example: A client (browser) sends an HTTP request to the server; the server responds with a message. This response may contain status information and the requested content.
HTTP Methods
- GET
- POST
- PUT
- HEAD
- DELETE
- PATCH
- OPTIONS
GET Method
GET is used to request data from a specified resource and is one of the most commonly used HTTP methods.
In a GET request, the data is sent in the query string of the URL:
/form.php?field1=value1&field2=value2&field3=value3
Notes about GET requests:
- Can be cached
- Remains in browser history
- Can be bookmarked
- Should not be used for sensitive data
- Has length limitations
- Used only to request data (no modification)
POST Method
POST is used to send data to a server to create or update a resource.
POST data is carried in the body of the HTTP request:
POST /form.php HTTP/1.1
Host: xxx.com
fieldname=value&fieldname=value2
Notes about POST requests:
- Never cached
- Does not remain in browser history
- Cannot be bookmarked
- No restrictions on data length
PUT Method
PUT is used to send data to the server to create or update a resource.
PUT is idempotent, meaning that making the same PUT request multiple times will always produce the same result. This is what differentiates it from POST.
HEAD Method
HEAD is similar to GET but the response does not contain a body.
It is often used to check what a GET request will return before actually making the request — for example, before downloading a large file.
DELETE Method
The DELETE method is used to delete the specified resource.
OPTIONS Method
OPTIONS returns the HTTP methods that are allowed for a specified resource (GET, POST, PUT, etc.).
Related Articles

Installing Apache Tomcat Server on Ubuntu
