2016-11-14 06:40:12 +08:00
|
|
|
Short: c
|
|
|
|
Long: cookie-jar
|
|
|
|
Arg: <filename>
|
|
|
|
Protocols: HTTP
|
2016-11-15 16:08:50 +08:00
|
|
|
Help: Write cookies to <filename> after operation
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: http
|
2021-08-31 22:37:14 +08:00
|
|
|
Example: -c store-here.txt $URL
|
|
|
|
Example: -c store-here.txt -b read-these $URL
|
2021-09-28 17:50:07 +08:00
|
|
|
Added: 7.9
|
2016-11-14 06:40:12 +08:00
|
|
|
---
|
|
|
|
Specify to which file you want curl to write all cookies after a completed
|
|
|
|
operation. Curl writes all cookies from its in-memory cookie storage to the
|
|
|
|
given file at the end of operations. If no cookies are known, no data will be
|
|
|
|
written. The file will be written using the Netscape cookie file format. If
|
|
|
|
you set the file name to a single dash, "-", the cookies will be written to
|
|
|
|
stdout.
|
|
|
|
|
|
|
|
This command line option will activate the cookie engine that makes curl
|
|
|
|
record and use cookies. Another way to activate it is to use the --cookie
|
|
|
|
option.
|
|
|
|
|
2021-10-31 23:34:44 +08:00
|
|
|
If the cookie jar cannot be created or written to, the whole curl operation
|
|
|
|
will not fail or even report an error clearly. Using --verbose will get a
|
|
|
|
warning displayed, but that is the only visible feedback you get about this
|
|
|
|
possibly lethal situation.
|
2016-11-14 06:40:12 +08:00
|
|
|
|
|
|
|
If this option is used several times, the last specified file name will be
|
|
|
|
used.
|