|
Answer» HTTP (HYPERTEXT Transfer Protocol) simply manages request-response between client and server. It works as a request-response protocol between client and server.
HTTP GET: This method is used to get information or data from a respective server at a specified URL.
Example: GET/RegisterStudent.asp?user=value1&pass=value2
HTTP POST: This method is used to send data or information to respective servers.
Example: POST/RegisterStudent.asp HTTP/1.1 Host: www.guru99.com user=value1&pass=value2 | HTTP GET | HTTP POST |
|---|
| Its parameters are included in the URL. | Its parameters are included in the body. | | This method is used to request data from specified resources and has no other effect. | This method is used to send data to a server to create or update resources. | | It carries a request parameter appended in the URL string. | It carries request parameters in the message body that make it a more secure way of sending data or information from the client to the server. | | Request method USING GET is cacheable. | Request method using POST is not cacheable. | | GET requests are less safe than POST. | Post request is SAFER than GET. | | There is a restriction on data type in GET method and only ASCII characters are allowed. | There are no restrictions on data type in this method and BINARY data is also allowed. | | Data is visible to everyone in the URL. | Data is not displayed in the URL. It is present in the payload. |
|