Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, HTTP: Learn your browser's language!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript". browse more comics! get the zine!
read the transcript!

Making HTTP requests with curl to real internet websites and trying different headers is my favourite way to play around with HTTP & learn.

curl tips:

  • -i shows the response headers
  • -Ishows the response headers (by sending a HEAD request)
  • -H adds a request header

Try the Range header:
curl -i https://examplecat.com/cat.txt -H "Range: bytes=8-17"

Request (and print out!) a compressed response:

curl -i https://examplecat.com
   -H "Accept-Encoding: gzip" -- output -

Get a webpage in Spanish:
curl -i https://twitter.com -H "Accept-Language: es-ES

Get redirected to another URL:
(hint: look at the Location header!)
curl -i http://examplecat.com

Guess what content delivery network Github iS using:
(hint: it’s in a header starting with x—)
curl -I https://github.githubassets.com

Find out when example.com was last updated
(hint: Last—Modified)
curl -I example.com

Get a 404 not found:
curl -i examplecat.com/bananas

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)