Chapter 12. Other Methods of State Management

In Chapter 5, I discussed the GET and POST request methods. A Web client can utilize either of these methods to send data to the Web server. With a GET request, a client can send data by utilizing the query string of the URL. With a POST request, the client can utilize the query string and can also include data in the content section of the HTTP request.

To demonstrate how a GET request can send data by utilizing the query string of a URL, consider the following link:

<a href=”/example.php?unique_id=12345”>Click Here</a> 

When a user clicks this link, the user’s Web client will issue a GET request similar to the following:

GET /example.php?unique_id=12345 HTTP/1.1 
Host: httphandbook.org 

In this ...

Get HTTP Developer’s Handbook 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.