[Shell command] curl コマンドでリクエストにヘッダーを付加する

作成日: 2019年11月05日

curl コマンドで -H オプションを使うと、ヘッダーを付加することができます。下記の例では、Content-Type: application/json というヘッダーを付加しています。

curl -H 'Content-Type: application/json' https://example.com
Shell command curl