What is mean HTTP Request?


What is HTTP Request?


·   When we enter any website or web page address so visit any website this process of entering information for getting exact webpage is called as HTTP request.

·      Inside this request it comprises following things:

o  User-Agent header
o  The Request method and Content
o  source IP address
o  proxy and port
o  The Requested URI (Uniform Resource Identifier)
o  Connection control header



·      HTTP methods are given in below table:

HTTP Request
Method
                     
                      Method Description
GET
Asks to get the resource at the requested URL.
POST
Asks the server to accept the body info attached. It is like GET request with extra info sent with the request.
HEAD
Asks for only the header part of whatever a GET would return. Just like GET but with no body.
TRACE
Asks for the loopback of the request message, for testing or troubleshooting.
PUT
Says to put the enclosed info (the body) at the requested URL.
DELETE
Says to delete the resource at the requested URL.
OPTIONS
Asks for a list of the HTTP methods to which the thing at the request URL can respond




What is Get and Post?



·  Get and Post are the methods of HTTP request and response.

· When we use GET method it requests the data from a specified resource.

·  When we use POST method it submits the processed data to a specified resource.

·      In Below table difference between Get and Post is given:

                           GET
                       POST
1) In case of Get request, only limited amount of data can be sent because data is sent in header.
In case of post request, large amount of data can be sent because data is sent in body.
2) Get request is not secured because data is exposed in URL bar.
Post request is secured because data is not exposed in URL bar.
3) Get request can be bookmarked.
Post request cannot be bookmarked.
4) Get request is more efficient and used more than Post.
Post request is less efficient and used less than get.


Comments

Popular Posts