DevOps and cloud

Stage 2 · Lesson 4 of 8

HTTP requests and responses

Networking for engineers

is the language browsers and servers use to talk. A request has a method (GET, POST, PUT, DELETE), a path such as /login, and such as Host and Authorization. Some requests also carry a body of data.

The response has a , headers and a body. Status codes tell you where to look when something fails. 2xx means success and 3xx means a redirect.

4xx means a problem with the request: 401 not logged in, 403 forbidden, 404 not found. 5xx means a problem on the server side. A 502 (bad gateway) or 504 (gateway timeout) usually means the proxy in front could not reach the app. curl -v shows every header in both directions.

Common traptreating every 5xx the same: a 502 from points at the app behind it, not at nginx itself.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with

Practise

  • Answer its networking questions before reading the answers to find your gaps

Keep handy

  • Official guide to serving files and proxying to an app, the base of every config

  • The HTTP guides on headers, caching and status codes, for debugging proxies

Also worth your time

Mark this stage as not done?