A web browser communicates with the server typically using one of the two HTTP (Hypertext Transfer Protocol) methods — GET and POST.
2. Definition of GET and POST
3. Use of GET and POST
In GET method the data is sent as URL parameters that are usually strings of name and value pairs separated by ampersands(
GET method should not be used when sending passwords or other sensitive information.
In POST method the data is sent to the server as a package in a separate communication with the processing script. Data sent through POST method will not visible in the URL.
4. Representation of GET and POST
A URL with GET data will look like this:
Query String(name/value pairs) is sent in the HTTP message body of a POST request:
5. Restrictions on data length
In GET method data is in the URL and URL length is restricted. A safe URL length limit is often 2048 characters but varies by browser and web server.
There are not any restrictions in case of POST method.