Created
December 2, 2025 09:03
-
-
Save kevinhooke/e49ace253a219bb10dae8cd5c5101395 to your computer and use it in GitHub Desktop.
curl cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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