GET and POST requests in HTTP traffic

This web page illustrates the use of GET vs POST requests in combination with forms and images include in a web page. The web page includes some instructions for exercises for you to carry out.

Using GET vs POST

Below a sample form which generates 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 in the HTTP traffic. Here you should see that for the GET request the parameters firstname and lastname end up in the URL, whereas with the POST request they end up in the body of the HTTP request


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