Last active
October 10, 2015 17:58
-
-
Save mtkd/3729321 to your computer and use it in GitHub Desktop.
Curl options
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
# return only HTTP status code | |
curl -sL -w "%{http_code}\\n" "http://news.ycombinator.com/" -o /dev/null | |
# return only HTTP status code and 302 URL | |
curl -sL -w "%{http_code} %{url_effective}\\n" "http://news.ycombinator.com/" -o /dev/null | |
# header only | |
curl -I news.ycombinator.com | |
# basic auth | |
curl -u username:password "http://news.ycombinator.com" -o /dev/null | |
# IIS auth | |
curl -u username:password "http://news.ycombinator.com" -o /dev/null --ntlm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment