The Hypertext Transfer Protocol (HTTP) is designed to ensure communication between the client and the server.
HTTP works as a request-response protocol between the client and the server.
A Web browser might be a client, and a network application on a computer might be a server-side.
Example: the client (browser) submits an HTTP request to the server, and the server returns a response to the client. The response contains status information about the request and what might be requested.
Two methods of HTTP request: GET and POST
GET-Requests data from the specified resource.
POST-submits the data to be processed to the specified resource
1. GET method
The query string (name/value pair) is sent in the URL of the GET request:
/test/demo_form.asp?name1=value1&name2=value2
Get requests can be cached
GET requests remain in browser history
Get requests can be bookmark-Favorites
GET requests should not be used when handling sensitive data
Get request has a length limit
GET requests should only be used to retrieve data
2. POST method
The query string (name/value pair) is sent in the HTTP message body of the POST request:
post/test/demo_form.asp http/1.1host:w3schools.comname1=value1 &name2=value2
POST requests are not cached
POST requests are not persisted in browser history
POST cannot be bookmarked
POST request has no requirement for data length
Comparison of 2 different methods
HTTP methods-get and Post