LoginSignup
4
3

More than 5 years have passed since last update.

cookie付きのcurl

Posted at

まずはcookie情報を.txtで作成する

cookie.txt
example.com  FALSE   /       FALSE   1391698800      key      value

作成したcookie情報でcurlしてみる

$ curl -b cookie.txt http://example.com/

もし example.com/?aaa=111&bbb=222 みたいに複数のパラメータをもつ場合は

$ curl -b cookie.txt -X GET http://example.com/?aaa=111\&bbb=222

注意: &はエスケープする必要がある

4
3
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
4
3