Skip to content

HTTP deep dive

Maria Husmann edited this page Mar 19, 2024 · 2 revisions

HTTP deep dive

Try to answer the following questions using the resources listed below. Answer the questions for yourself, you don't need to hand-in anything.

  • How are HTTP requests structured?
  • Which HTTP methods exist?
  • Which HTTP methods are idempotent, which are safe?
  • What HTTP response status codes should I know?

HTTP resources

Postman exercise

Postman is an app for testing HTTP APIs. You can download it here or you can use Hopscotch directly in your browser. Note that you don't need to create an account and sign in if you don't want to. You can still use the app. Using Postman do the following exercises:

  • Send an HTTP GET request to known servers, for example http://hslu.ch
    • Inspect the response
    • Look at the response time
    • Do you get the same result every time?
  • Try to find a really fast server and a really slow response time. Record your results in this Google Doc
    • What factors can impact the response time?
  • Try to provoke a response code that is not OK. What request did you send to which address and what response do you get? Record your results in the Google Doc

Debugging network and timing issues

XKCD networking problems

Image Credit XKCD

Modern browser developer tools come with a network tab to help you find issues in the communication over a network. Open the browser of your choice and open the network tab, then (re)load a website. What do you see?

Optional futher reading matrial on HTTPS and HTTP/2

Reading material on REST APIs