5.7 ACCESSING PARAMETER DATA

It has been seen earlier that in a GET request, the request parameters are given from the Query string. The Query string is the data following the question mark(?) on the URL. It is possible to include multiple parameters in the Query string, and they are separated by the ampersand (&) character. For example, consider the following URL.

http://www.abc.com?name1=val1&name2=val2

The Query string contains two parameters—name1 and name2 with values val1 and val2 respectively.

For a request submitted with a POST method, the request parameters are taken from both the query string and the posted data. The posted data is available in the body of the request, generally encoded. Irrespective of POST or GET, the methods that ...

Get Web Technology: Theory and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.