Stage 1 · Lesson 9 of 10
HTTP requests, responses and headers
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· follow one of these
- GuideFreeDev.java: Learn Java
Oracle · Beginner
The official path through modern Java: records, collections, generics and exceptions
- CourseFreeJava Programming MOOC
University of Helsinki · Beginner
Free Helsinki course with hundreds of graded exercises, the best way to get fluent
Practise
Keep handy
Also worth your time
The DNS, TCP, TLS and HTTP steps behind every request your backend will handle