Linux, terminal and Git

Stage 8 · Lesson 7 of 9

Talking HTTP with curl

SSH, servers and debugging

sends requests (the messages browsers use to talk to websites) from the terminal. That makes it the quickest way to test an API or a website. curl -i URL shows the response along with the body.

-X POST -H "Content-Type: application/json" -d '{...}' sends JSON data. -L follows . -v prints the whole conversation, including the secure connection (TLS) and name lookup (DNS) steps.

Pair it with jq to read JSON answers. When a web page only says "network error", curl tells you whether the server itself is fine.

Common trappasting commands with real into shared chats or shell history that others can see.

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

Practise

Keep handy

Also worth your time

  • The server, networking and troubleshooting branches of the Linux map

Mark this stage as not done?