• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Short: c
5Long: cookie-jar
6Arg: <filename>
7Protocols: HTTP
8Help: Write cookies to <filename> after operation
9Category: http
10Added: 7.9
11Multi: single
12See-also:
13  - cookie
14Example:
15  - -c store-here.txt $URL
16  - -c store-here.txt -b read-these $URL
17---
18
19# `--cookie-jar`
20
21Specify to which file you want curl to write all cookies after a completed
22operation. Curl writes all cookies from its in-memory cookie storage to the
23given file at the end of operations. If no cookies are known, no data is
24written. The file is created using the Netscape cookie file format. If you set
25the file name to a single dash, "-", the cookies are written to stdout.
26
27The file specified with --cookie-jar is only used for output. No cookies are
28read from the file. To read cookies, use the --cookie option. Both options
29can specify the same file.
30
31This command line option activates the cookie engine that makes curl record
32and use cookies. The --cookie option also activates it.
33
34If the cookie jar cannot be created or written to, the whole curl operation
35does not fail or even report an error clearly. Using --verbose gets a warning
36displayed, but that is the only visible feedback you get about this possibly
37lethal situation.
38