GET
|
POST
|
We can only send limited data with GET method
|
we can send large amount of data with POST
|
GET method is not secure because data is exposed in the URL
|
POST method is secure because data is sent in request body
|
GET is the default HTTP method
|
We need to specify method as POST to send request with POST method.
|
You can bookmark GET request for e.g. Google Search.
|
you cannot bookmark a POST request
|
GET request is also cacheable
|
you cannot cache POST requests
|
GET sends data as part of URI
|
while POST method sends data as HTTP content
|
GET requests are sent as a query string on the URL:
for example:
GET index.html?name1=value&name2=value
|
POST requests are sent in the body of the HTTP request: for example:
POST /index.html
|
There is a limitation on sending data using GET method
It means we can transfer less data to sever.
|
POST doesn't have such limits. It means we can send large data to
server.
|
Dev
Saturday, 26 December 2015
Difference Between GET and POST
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment