Skip to content

Instantly share code, notes, and snippets.

@mtkd
Last active October 10, 2015 17:58
Show Gist options
  • Select an option

  • Save mtkd/3729321 to your computer and use it in GitHub Desktop.

Select an option

Save mtkd/3729321 to your computer and use it in GitHub Desktop.

Revisions

  1. mtkd revised this gist Nov 26, 2013. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,14 @@
    # 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
    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
  2. mtkd revised this gist Sep 20, 2012. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,5 @@
    curl -sL -w "%{http_code}\\n" "http://news.ycombinator.com/" -o /dev/null
    # return only HTTP status code
    curl -sL -w "%{http_code}\\n" "http://news.ycombinator.com/" -o /dev/null

    # header only
    curl -I news.ycombinator.com
  3. mtkd created this gist Sep 15, 2012.
    1 change: 1 addition & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    curl -sL -w "%{http_code}\\n" "http://news.ycombinator.com/" -o /dev/null