Backend development

Stage 1 · Lesson 9 of 10

HTTP requests, responses and headers

Your language and how HTTP works

is a set of structured messages sent over that connection. A request has a method (what to do), a path (which thing), headers and sometimes a body. A has a , headers and a body.

HTTP headers are labelled notes about the message, and your backend depends on them. Host says which site is wanted, and Content-Type says what kind of data the body holds. Authorization carries login details.

Cache-Control and ETag control caching, and Cookie and Set-Cookie carry sessions, which is how a site remembers you. The best way to see all this is curl -v https://example.com. It prints the address it connects to and the TLS .

It then shows every request header, marked with >, and every response header, marked with <.

Common trapsending without Content-Type: application/json and then wondering why the server cannot read the body.

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

  • CourseFree
    A Tour of Go

    The Go Authors · Beginner

    The official interactive tour: basics, methods, interfaces, generics and concurrency

Practise

  • Your language track: small exercises with free mentor feedback on idiomatic code

Keep handy

  • Short runnable examples to look up while you write: errors, JSON, goroutines, testing

  • Read the HTTP overview, methods, headers and status code pages until they feel obvious

Also worth your time

Mark this stage as not done?