curl

  • httpを確認
curl http://domain.com/
  • 進捗等を表示しない。
curl -s http://domain.com/
  • メソッドを明示指定する。
curl -XGET http://domain.com/
  • httpsを確認
curl -k http://domain.com/
  • proxyを使ってhttpを確認
curl --proxy 192.168.0.1 http://domain.com/
  • socks5 proxyを使ってhttpを確認
curl --socks5 192.168.0.1 http://domain.com/
  • httpの結果をファイルに保存
curl http://domain.com/ -o tmp.html
  • httpの結果をファイルに保存
curl http://domain.com/ -o tmp.html
  • HOSTヘッダを指定
curl -H 'Host: www.domain.com' http://web1/
  • user-agentを指定
curl http://domain.com/ -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:46.0) Gecko/20100101 Firefox/46.0"
  • http statusのみ確認
curl -s http://domain.com/ -w"%{http_code}\n" -o /dev/null