2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
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
|
2021-11-15 22:58:20 +08:00
|
|
|
See-also: cookie
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: single
|
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.
|
|
|
|
|
2023-08-11 23:04:37 +08:00
|
|
|
The file specified with --cookie-jar is only used for output. No cookies will
|
|
|
|
be read from the file. To read cookies, use the --cookie option. Both options
|
|
|
|
can specify the same file.
|
|
|
|
|
2016-11-14 06:40:12 +08:00
|
|
|
This command line option will activate the cookie engine that makes curl
|
2023-08-11 23:04:37 +08:00
|
|
|
record and use cookies. The --cookie option also activates it.
|
2016-11-14 06:40:12 +08:00
|
|
|
|
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.
|