GET and POST requests in HTTP traffic

This web page illustrates the use of GET vs POST in HTTP requests using a form element and an image element included in a web page.

Using GET vs POST

Some sample form, to generate a GET request:

   Please enter your name to register

   First name: Last name:

Now the same with POST instead of GET:

   Please enter your name to register

   First name: Last name:

FOR YOU TO DO: Try out the buttons above, and look at the generated web traffic in the OWASP ZAP proxy.
You should see GET and POST requests to www.w3schools.com. Here you should see that for the GET requests the two parameters, firstname and lastname end up in the URL, whereas with the POST request they do not, but are in the body.


Using GET and POST with a hidden field

Now a GET with a hidden field for the first name. This could for instance be a webpage tailored for user 'John' who already supplied their first name:

   Hello John, please also enter your last name to register:

   Last name:

Now the same, but with a POST field:

   Hello John, please also enter your last name to register:

   Last name:

FOR YOU TO DO: Look at the HTTP traffic to see which value are sent at the first name, and look at the HTML source of this webpage to see where the hidden parameters come from.


Including images in a web page

Radboud Logo This webpage also includes an imagine, namely the Radboud logo to the right of this text. The browser takes care of wrapping the text around the image: if you resize your browser window to make it wider or narrower you should see the text is wrapped around the image differently.

FOR YOU TO DO