LoginSignup
0
0

curlコマンド でヘッダ情報を取得

Posted at

概要

curl コマンドで headオプションを使用して
ヘッダー情報を取得します。
head オプションを使うと
webサーバーなどが返ってくることがあるみたいです。
自分用にメモとして記載しています。

コマンド

下記がcurlコマンドです。
オプションで--headを使います。

curl --head https://abcd.com

例えば、Qiitaのヘッダー情報を確認するとします。
下記のコマンドを実行します。

curl --head https://qiita.com/

コマンドを実行すると
下記のようなレスポンスが返ってきます。
QiitaのWebサーバーにnginxを使っていることが分かります。
image.png

0
0
0

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
0
0