5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2018-01-05

よく使うわりにいつも忘れる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://...

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

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?