LoginSignup
90
57

More than 5 years have passed since last update.

cURL でレスポンスヘッダを表示する

Last updated at Posted at 2012-12-26

-Iオプションまたは--dump-header(-D) オプションを使用する.--dumper-headerオプションは出力先ファイルをパラメータで指定するので,- を指定することで標準出力に表示させる.

$ curl --dump-header - http://www.w3c.org/
HTTP/1.1 301 Moved Permanently
Cache-Control: no-cache
Content-length: 0
Location: http://www.w3.org/
Connection: close

90
57
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
90
57