LoginSignup
5

More than 5 years have passed since last update.

posted at

updated at

curlでよく使うオプションメモ

よく使うわりにいつも忘れるcurlのオプション。

メソッドを指定

curl -X "POST" https://...

Xオプション

オレオレ証明の警告無視

curl -k https://...

kオプション

Cookie埋める

curl -b name=value https://...

bオプション

複数個送りたい時はbを複数書くのではなく

curl -b 'name=value&name2=value2' https://...

という感じにする。

リダイレクトに追従

curl -L https://...

Lオプション

ヘッダを見る

curl --head https://...

これだとヘッダだけが出力される

curl --include https://...

こうするとヘッダも含めて出力される

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
What you can do with signing up
5