Jun 26

HTTP GET and POST Request

The HTTP is communication protocol between client(Web browser) and server(Application on a computer that host a website is the server). The HTTP stand for hypertext transfer protocol. Two method used for communication between client and server that is GET and POST. GET Request communicate with server through url by sending name/value pairs query string.(for example : http://www.test.com/test.php?name=abc.

1. GET Request can be cached.
2. Never used GET request with sensitive data.
3. GET request have length restrictions because GET request send by url and url have restrictions of length, means we can send max 255 char by url.
4. It is also save in browser history.
5. GET Request can be bookmarked.
6. GET Request have restriction on data type, Only ASCII characters allowed
7. GET Request is less secure than post because data send using url. so, never send sensitive data like password and other information by GET request.
8. GET used encoding type “application/x-www-form-urlencoded”

POST method send data using http message body through query string name/value pairs.


POST /test.php HTTP 1.1
Host www.test.com

1. POST request are never cached.
2. POST request have no restriction, binary data also allowed.
3. POST request parameters are not saved in browser history.
4. POST request more secure than GET because parameter not saved in bowser history or in server logs.
5. POST used encoding type “application/x-www-form-urlencoded or multipart/form-data”. use multipart data encoding for binary data.
6. POST request have no restriction of data length.
7. POST request cann’t be bookmarked.

Some other HTTP request as follow.

1. HEAD : same as GET request but only return HTTP header and no document body.
2. PUT : Used to create a resource, or overwrite it. While you specify the resources new URL.
3. DELETE : This method used for Delete the specified request.
4. OPTIONS: Returns the HTTP methods that the server supports
5. CONNECT: Converts the request connection to a transparent TCP/IP tunnel

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>