Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Created December 2, 2025 09:03
Show Gist options
  • Select an option

  • Save kevinhooke/e49ace253a219bb10dae8cd5c5101395 to your computer and use it in GitHub Desktop.

Select an option

Save kevinhooke/e49ace253a219bb10dae8cd5c5101395 to your computer and use it in GitHub Desktop.
curl cheatsheet
# on MacOS to avoid the "zsh: no matches found" error, wrap url in quotes, or 'setopt noglob' to
# turn off wildcard '?' matching
# show HTTP response
curl -i url
# follow 302 redirects
curl -L url
# search response for http status, discarding all other content, and following redirects (-L)
curl -o /dev/null -L -s -w "%{http_code}\n" url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment