Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, Bite Size Networking!! 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". get the zine!
read the transcript!

curl

smiling stick figure with short curly hair: it’s my favourite way to make HTTP requests!

great for testing APIs!

$ curl wizardzines.com

-H

is for for header

good for POST requests to JSON APIs
-H “content-Type:application/json”

allow compressed response: -H “Accept-Encoding: gzip”

-L

follow 3xx redirects

--data

--data '{"name": "julia"'

--data @filename.json

(@ reads the data to send from a file)

i

show response headers

I

show ONLY response headers (makes a HEAD request)

- X POST

send a POST request instead of a GET (-X PUT etc works too)

- v

show request headers & more

- k

insecure: don’t verify SSL certificates

--connect to ::IP

(or hostname)

send request to IP instead

use bfore changing DNS to a new IP

copy as cURL

Have something in your browser you want to download from the command line?

In Firefox/Chrome/Safari:

Developer Tools
-> Network tab
-> right click on the request
-> copy as curl
(can have sensitive info in cookies!)