0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cookieがsetされるAPIを叩いた時に使えるCurlコマンドオプション

Posted at

curlでAPIテストするときにcookieを保存して次のリクエストで再利用する方法

手順:

保存する:

curl -i -c cookie.txt http://localhost:8080/api/login
(-c はcookieをファイルに保存するオプション。)

再利用する:

curl -b cookie.txt http://localhost:8080/api/private
(-b はcookieファイルを読み込んで送信するオプション。)
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?