1curl(1) Curl Manual curl(1)
2
3
4
6 curl - transfer a URL
7
9 curl [options / URLs]
10
12 curl is a tool to transfer data from or to a server, using one of the
13 supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP,
14 IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS,
15 SMTP, SMTPS, TELNET and TFTP). The command is designed to work without
16 user interaction.
17
18 curl offers a busload of useful tricks like proxy support, user authen‐
19 tication, FTP upload, HTTP post, SSL connections, cookies, file trans‐
20 fer resume, Metalink, and more. As you will see below, the number of
21 features will make your head spin!
22
23 curl is powered by libcurl for all transfer-related features. See
24 libcurl(3) for details.
25
27 The URL syntax is protocol-dependent. You'll find a detailed descrip‐
28 tion in RFC 3986.
29
30 You can specify multiple URLs or parts of URLs by writing part sets
31 within braces as in:
32
33 http://site.{one,two,three}.com
34
35 or you can get sequences of alphanumeric series by using [] as in:
36
37 ftp://ftp.example.com/file[1-100].txt
38
39 ftp://ftp.example.com/file[001-100].txt (with leading zeros)
40
41 ftp://ftp.example.com/file[a-z].txt
42
43 Nested sequences are not supported, but you can use several ones next
44 to each other:
45
46 http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
47
48 You can specify any amount of URLs on the command line. They will be
49 fetched in a sequential manner in the specified order. You can specify
50 command line options and URLs mixed and in any order on the command
51 line.
52
53 You can specify a step counter for the ranges to get every Nth number
54 or letter:
55
56 http://example.com/file[1-100:10].txt
57
58 http://example.com/file[a-z:2].txt
59
60 When using [] or {} sequences when invoked from a command line prompt,
61 you probably have to put the full URL within double quotes to avoid the
62 shell from interfering with it. This also goes for other characters
63 treated special, like for example '&', '?' and '*'.
64
65 Provide the IPv6 zone index in the URL with an escaped percentage sign
66 and the interface name. Like in
67
68 http://[fe80::3%25eth0]/
69
70 If you specify URL without protocol:// prefix, curl will attempt to
71 guess what protocol you might want. It will then default to HTTP but
72 try other protocols based on often-used host name prefixes. For exam‐
73 ple, for host names starting with "ftp." curl will assume you want to
74 speak FTP.
75
76 curl will do its best to use what you pass to it as a URL. It is not
77 trying to validate it as a syntactically correct URL by any means but
78 is instead very liberal with what it accepts.
79
80 curl will attempt to re-use connections for multiple file transfers, so
81 that getting many files from the same server will not do multiple con‐
82 nects / handshakes. This improves speed. Of course this is only done on
83 files specified on a single command line and cannot be used between
84 separate curl invokes.
85
87 curl normally displays a progress meter during operations, indicating
88 the amount of transferred data, transfer speeds and estimated time
89 left, etc. The progress meter displays number of bytes and the speeds
90 are in bytes per second. The suffixes (k, M, G, T, P) are 1024 based.
91 For example 1k is 1024 bytes. 1M is 1048576 bytes.
92
93 curl displays this data to the terminal by default, so if you invoke
94 curl to do an operation and it is about to write data to the terminal,
95 it disables the progress meter as otherwise it would mess up the output
96 mixing progress meter and response data.
97
98 If you want a progress meter for HTTP POST or PUT requests, you need to
99 redirect the response output to a file, using shell redirect (>), -o,
100 --output or similar.
101
102 It is not the same case for FTP upload as that operation does not spit
103 out any response data to the terminal.
104
105 If you prefer a progress "bar" instead of the regular meter, -#,
106 --progress-bar is your friend. You can also disable the progress meter
107 completely with the -s, --silent option.
108
110 Options start with one or two dashes. Many of the options require an
111 additional value next to them.
112
113 The short "single-dash" form of the options, -d for example, may be
114 used with or without a space between it and its value, although a space
115 is a recommended separator. The long "double-dash" form, -d, --data for
116 example, requires a space between it and its value.
117
118 Short version options that don't need any additional values can be used
119 immediately next to each other, like for example you can specify all
120 the options -O, -L and -v at once as -OLv.
121
122 In general, all boolean options are enabled with --option and yet again
123 disabled with --no-option. That is, you use the exact same option name
124 but prefix it with "no-". However, in this list we mostly only list and
125 show the --option version of them. (This concept with --no options was
126 added in 7.19.0. Previously most options were toggled on/off on
127 repeated use of the same command line option.)
128
129 --abstract-unix-socket <path>
130 (HTTP) Connect through an abstract Unix domain socket, instead
131 of using the network. Note: netstat shows the path of an
132 abstract socket prefixed with '@', however the <path> argument
133 should not have this leading character.
134
135 Added in 7.53.0.
136
137 --anyauth
138 (HTTP) Tells curl to figure out authentication method by itself,
139 and use the most secure one the remote site claims to support.
140 This is done by first doing a request and checking the response-
141 headers, thus possibly inducing an extra network round-trip.
142 This is used instead of setting a specific authentication
143 method, which you can do with --basic, --digest, --ntlm, and
144 --negotiate.
145
146 Using --anyauth is not recommended if you do uploads from stdin,
147 since it may require data to be sent twice and then the client
148 must be able to rewind. If the need should arise when uploading
149 from stdin, the upload operation will fail.
150
151 Used together with -u, --user.
152
153 See also --proxy-anyauth and --basic and --digest.
154
155 -a, --append
156 (FTP SFTP) When used in an upload, this makes curl append to the
157 target file instead of overwriting it. If the remote file
158 doesn't exist, it will be created. Note that this flag is
159 ignored by some SFTP servers (including OpenSSH).
160
161 --basic
162 (HTTP) Tells curl to use HTTP Basic authentication with the
163 remote host. This is the default and this option is usually
164 pointless, unless you use it to override a previously set option
165 that sets a different authentication method (such as --ntlm,
166 --digest, or --negotiate).
167
168 Used together with -u, --user.
169
170 See also --proxy-basic.
171
172 --cacert <file>
173 (TLS) Tells curl to use the specified certificate file to verify
174 the peer. The file may contain multiple CA certificates. The
175 certificate(s) must be in PEM format. Normally curl is built to
176 use a default file for this, so this option is typically used to
177 alter that default file.
178
179 curl recognizes the environment variable named 'CURL_CA_BUNDLE'
180 if it is set, and uses the given path as a path to a CA cert
181 bundle. This option overrides that variable.
182
183 The windows version of curl will automatically look for a CA
184 certs file named ´curl-ca-bundle.crt´, either in the same direc‐
185 tory as curl.exe, or in the Current Working Directory, or in any
186 folder along your PATH.
187
188 If curl is built against the NSS SSL library, the NSS PEM
189 PKCS#11 module (libnsspem.so) needs to be available for this
190 option to work properly.
191
192 (iOS and macOS only) If curl is built against Secure Transport,
193 then this option is supported for backward compatibility with
194 other SSL engines, but it should not be set. If the option is
195 not set, then curl will use the certificates in the system and
196 user Keychain to verify the peer, which is the preferred method
197 of verifying the peer's certificate chain.
198
199 (Schannel/WinSSL only) This option is supported for WinSSL in
200 Windows 7 or later with libcurl 7.60 or later. This option is
201 supported for backward compatibility with other SSL engines;
202 instead it is recommended to use Windows' store of root certifi‐
203 cates (the default for WinSSL).
204
205 If this option is used several times, the last one will be used.
206
207 --capath <dir>
208 (TLS) Tells curl to use the specified certificate directory to
209 verify the peer. Multiple paths can be provided by separating
210 them with ":" (e.g. "path1:path2:path3"). The certificates must
211 be in PEM format, and if curl is built against OpenSSL, the
212 directory must have been processed using the c_rehash utility
213 supplied with OpenSSL. Using --capath can allow OpenSSL-powered
214 curl to make SSL-connections much more efficiently than using
215 --cacert if the --cacert file contains many CA certificates.
216
217 If this option is set, the default capath value will be ignored,
218 and if it is used several times, the last one will be used.
219
220 --cert-status
221 (TLS) Tells curl to verify the status of the server certificate
222 by using the Certificate Status Request (aka. OCSP stapling) TLS
223 extension.
224
225 If this option is enabled and the server sends an invalid (e.g.
226 expired) response, if the response suggests that the server cer‐
227 tificate has been revoked, or no response at all is received,
228 the verification fails.
229
230 This is currently only implemented in the OpenSSL, GnuTLS and
231 NSS backends.
232
233 Added in 7.41.0.
234
235 --cert-type <type>
236 (TLS) Tells curl what type the provided client certificate is
237 using. PEM, DER, ENG and P12 are recognized types. If not spec‐
238 ified, PEM is assumed.
239
240 If this option is used several times, the last one will be used.
241
242 See also -E, --cert and --key and --key-type.
243
244 -E, --cert <certificate[:password]>
245 (TLS) Tells curl to use the specified client certificate file
246 when getting a file with HTTPS, FTPS or another SSL-based proto‐
247 col. The certificate must be in PKCS#12 format if using Secure
248 Transport, or PEM format if using any other engine. If the
249 optional password isn't specified, it will be queried for on the
250 terminal. Note that this option assumes a "certificate" file
251 that is the private key and the client certificate concatenated!
252 See -E, --cert and --key to specify them independently.
253
254 If curl is built against the NSS SSL library then this option
255 can tell curl the nickname of the certificate to use within the
256 NSS database defined by the environment variable SSL_DIR (or by
257 default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (lib‐
258 nsspem.so) is available then PEM files may be loaded. If you
259 want to use a file from the current directory, please precede it
260 with "./" prefix, in order to avoid confusion with a nickname.
261 If the nickname contains ":", it needs to be preceded by "\" so
262 that it is not recognized as password delimiter. If the nick‐
263 name contains "\", it needs to be escaped as "\\" so that it is
264 not recognized as an escape character.
265
266 If curl is built against OpenSSL library, and the engine pkcs11
267 is available, then a PKCS#11 URI (RFC 7512) can be used to spec‐
268 ify a certificate located in a PKCS#11 device. A string begin‐
269 ning with "pkcs11:" will be interpreted as a PKCS#11 URI. If a
270 PKCS#11 URI is provided, then the --engine option will be set as
271 "pkcs11" if none was provided and the --cert-type option will be
272 set as "ENG" if none was provided.
273
274 (iOS and macOS only) If curl is built against Secure Transport,
275 then the certificate string can either be the name of a certifi‐
276 cate/private key in the system or user keychain, or the path to
277 a PKCS#12-encoded certificate and private key. If you want to
278 use a file from the current directory, please precede it with
279 "./" prefix, in order to avoid confusion with a nickname.
280
281 (Schannel/WinSSL only) Client certificates must be specified by
282 a path expression to a certificate store. (Loading PFX is not
283 supported; you can import it to a store first). You can use
284 "<store location>\<store name>\<thumbprint>" to refer to a cer‐
285 tificate in the system certificates store, for example, "Curren‐
286 tUser\MY\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint
287 is usually a SHA-1 hex string which you can see in certificate
288 details. Following store locations are supported: CurrentUser,
289 LocalMachine, CurrentService, Services, CurrentUserGroupPolicy,
290 LocalMachineGroupPolicy, LocalMachineEnterprise.
291
292 If this option is used several times, the last one will be used.
293
294 See also --cert-type and --key and --key-type.
295
296 --ciphers <list of ciphers>
297 (TLS) Specifies which ciphers to use in the connection. The list
298 of ciphers must specify valid ciphers. Read up on SSL cipher
299 list details on this URL:
300
301 https://curl.haxx.se/docs/ssl-ciphers.html
302
303 If this option is used several times, the last one will be used.
304
305 --compressed-ssh
306 (SCP SFTP) Enables built-in SSH compression. This is a request,
307 not an order; the server may or may not do it.
308
309 Added in 7.56.0.
310
311 --compressed
312 (HTTP) Request a compressed response using one of the algorithms
313 curl supports, and save the uncompressed document. If this
314 option is used and the server sends an unsupported encoding,
315 curl will report an error.
316
317 -K, --config <file>
318
319 Specify a text file to read curl arguments from. The command
320 line arguments found in the text file will be used as if they
321 were provided on the command line.
322
323 Options and their parameters must be specified on the same line
324 in the file, separated by whitespace, colon, or the equals sign.
325 Long option names can optionally be given in the config file
326 without the initial double dashes and if so, the colon or equals
327 characters can be used as separators. If the option is specified
328 with one or two dashes, there can be no colon or equals charac‐
329 ter between the option and its parameter.
330
331 If the parameter is to contain whitespace, the parameter must be
332 enclosed within quotes. Within double quotes, the following
333 escape sequences are available: \\, \", \t, \n, \r and \v. A
334 backslash preceding any other letter is ignored. If the first
335 column of a config line is a '#' character, the rest of the line
336 will be treated as a comment. Only write one option per physical
337 line in the config file.
338
339 Specify the filename to -K, --config as '-' to make curl read
340 the file from stdin.
341
342 Note that to be able to specify a URL in the config file, you
343 need to specify it using the --url option, and not by simply
344 writing the URL on its own line. So, it could look similar to
345 this:
346
347 url = "https://curl.haxx.se/docs/"
348
349 When curl is invoked, it (unless -q, --disable is used) checks
350 for a default config file and uses it if found. The default con‐
351 fig file is checked for in the following places in this order:
352
353 1) curl tries to find the "home dir": It first checks for the
354 CURL_HOME and then the HOME environment variables. Failing that,
355 it uses getpwuid() on Unix-like systems (which returns the home
356 dir given the current user in your system). On Windows, it then
357 checks for the APPDATA variable, or as a last resort the '%USER‐
358 PROFILE%\Application Data'.
359
360 2) On windows, if there is no _curlrc file in the home dir, it
361 checks for one in the same dir the curl executable is placed. On
362 Unix-like systems, it will simply try to load .curlrc from the
363 determined home dir.
364
365 # --- Example file ---
366 # this is a comment
367 url = "example.com"
368 output = "curlhere.html"
369 user-agent = "superagent/1.0"
370
371 # and fetch another URL too
372 url = "example.com/docs/manpage.html"
373 -O
374 referer = "http://nowhereatall.example.com/"
375 # --- End of example file ---
376
377 This option can be used multiple times to load multiple config
378 files.
379
380 --connect-timeout <seconds>
381 Maximum time in seconds that you allow curl's connection to
382 take. This only limits the connection phase, so if curl con‐
383 nects within the given period it will continue - if not it will
384 exit. Since version 7.32.0, this option accepts decimal values.
385
386 If this option is used several times, the last one will be used.
387
388 See also -m, --max-time.
389
390 --connect-to <HOST1:PORT1:HOST2:PORT2>
391
392 For a request to the given HOST1:PORT1 pair, connect to
393 HOST2:PORT2 instead. This option is suitable to direct requests
394 at a specific server, e.g. at a specific cluster node in a clus‐
395 ter of servers. This option is only used to establish the net‐
396 work connection. It does NOT affect the hostname/port that is
397 used for TLS/SSL (e.g. SNI, certificate verification) or for the
398 application protocols. "HOST1" and "PORT1" may be the empty
399 string, meaning "any host/port". "HOST2" and "PORT2" may also be
400 the empty string, meaning "use the request's original
401 host/port".
402
403 A "host" specified to this option is compared as a string, so it
404 needs to match the name used in request URL. It can be either
405 numerical such as "127.0.0.1" or the full host name such as
406 "example.org".
407
408 This option can be used many times to add many connect rules.
409
410 See also --resolve and -H, --header. Added in 7.49.0.
411
412 -C, --continue-at <offset>
413 Continue/Resume a previous file transfer at the given offset.
414 The given offset is the exact number of bytes that will be
415 skipped, counting from the beginning of the source file before
416 it is transferred to the destination. If used with uploads, the
417 FTP server command SIZE will not be used by curl.
418
419 Use "-C -" to tell curl to automatically find out where/how to
420 resume the transfer. It then uses the given output/input files
421 to figure that out.
422
423 If this option is used several times, the last one will be used.
424
425 See also -r, --range.
426
427 -c, --cookie-jar <filename>
428 (HTTP) Specify to which file you want curl to write all cookies
429 after a completed operation. Curl writes all cookies from its
430 in-memory cookie storage to the given file at the end of opera‐
431 tions. If no cookies are known, no data will be written. The
432 file will be written using the Netscape cookie file format. If
433 you set the file name to a single dash, "-", the cookies will be
434 written to stdout.
435
436 This command line option will activate the cookie engine that
437 makes curl record and use cookies. Another way to activate it is
438 to use the -b, --cookie option.
439
440 If the cookie jar can't be created or written to, the whole curl
441 operation won't fail or even report an error clearly. Using -v,
442 --verbose will get a warning displayed, but that is the only
443 visible feedback you get about this possibly lethal situation.
444
445 If this option is used several times, the last specified file
446 name will be used.
447
448 -b, --cookie <data>
449 (HTTP) Pass the data to the HTTP server in the Cookie header. It
450 is supposedly the data previously received from the server in a
451 "Set-Cookie:" line. The data should be in the format
452 "NAME1=VALUE1; NAME2=VALUE2".
453
454 If no '=' symbol is used in the argument, it is instead treated
455 as a filename to read previously stored cookie from. This option
456 also activates the cookie engine which will make curl record
457 incoming cookies, which may be handy if you're using this in
458 combination with the -L, --location option or do multiple URL
459 transfers on the same invoke. If the file name is exactly a
460 minus ("-"), curl will instead the contents from stdin.
461
462 The file format of the file to read cookies from should be plain
463 HTTP headers (Set-Cookie style) or the Netscape/Mozilla cookie
464 file format.
465
466 The file specified with -b, --cookie is only used as input. No
467 cookies will be written to the file. To store cookies, use the
468 -c, --cookie-jar option.
469
470 Exercise caution if you are using this option and multiple
471 transfers may occur. If you use the NAME1=VALUE1; format, or in
472 a file use the Set-Cookie format and don't specify a domain,
473 then the cookie is sent for any domain (even after redirects are
474 followed) and cannot be modified by a server-set cookie. If the
475 cookie engine is enabled and a server sets a cookie of the same
476 name then both will be sent on a future transfer to that server,
477 likely not what you intended. To address these issues set a
478 domain in Set-Cookie (doing that will include sub domains) or
479 use the Netscape format.
480
481 If this option is used several times, the last one will be used.
482
483 Users very often want to both read cookies from a file and write
484 updated cookies back to a file, so using both -b, --cookie and
485 -c, --cookie-jar in the same command line is common.
486
487 --create-dirs
488 When used in conjunction with the -o, --output option, curl will
489 create the necessary local directory hierarchy as needed. This
490 option creates the dirs mentioned with the -o, --output option,
491 nothing else. If the --output file name uses no dir or if the
492 dirs it mentions already exist, no dir will be created.
493
494 To create remote directories when using FTP or SFTP, try --ftp-
495 create-dirs.
496
497 --crlf (FTP SMTP) Convert LF to CRLF in upload. Useful for MVS
498 (OS/390).
499
500 (SMTP added in 7.40.0)
501
502 --crlfile <file>
503 (TLS) Provide a file using PEM format with a Certificate Revoca‐
504 tion List that may specify peer certificates that are to be con‐
505 sidered revoked.
506
507 If this option is used several times, the last one will be used.
508
509 Added in 7.19.7.
510
511 --data-ascii <data>
512 (HTTP) This is just an alias for -d, --data.
513
514 --data-binary <data>
515 (HTTP) This posts data exactly as specified with no extra pro‐
516 cessing whatsoever.
517
518 If you start the data with the letter @, the rest should be a
519 filename. Data is posted in a similar manner as -d, --data
520 does, except that newlines and carriage returns are preserved
521 and conversions are never done.
522
523 If this option is used several times, the ones following the
524 first will append data as described in -d, --data.
525
526 --data-raw <data>
527 (HTTP) This posts data similarly to -d, --data but without the
528 special interpretation of the @ character.
529
530 See also -d, --data. Added in 7.43.0.
531
532 --data-urlencode <data>
533 (HTTP) This posts data, similar to the other -d, --data options
534 with the exception that this performs URL-encoding.
535
536 To be CGI-compliant, the <data> part should begin with a name
537 followed by a separator and a content specification. The <data>
538 part can be passed to curl using one of the following syntaxes:
539
540 content
541 This will make curl URL-encode the content and pass that
542 on. Just be careful so that the content doesn't contain
543 any = or @ symbols, as that will then make the syntax
544 match one of the other cases below!
545
546 =content
547 This will make curl URL-encode the content and pass that
548 on. The preceding = symbol is not included in the data.
549
550 name=content
551 This will make curl URL-encode the content part and pass
552 that on. Note that the name part is expected to be URL-
553 encoded already.
554
555 @filename
556 This will make curl load data from the given file
557 (including any newlines), URL-encode that data and pass
558 it on in the POST.
559
560 name@filename
561 This will make curl load data from the given file
562 (including any newlines), URL-encode that data and pass
563 it on in the POST. The name part gets an equal sign
564 appended, resulting in name=urlencoded-file-content. Note
565 that the name is expected to be URL-encoded already.
566
567 See also -d, --data and --data-raw. Added in 7.18.0.
568
569 -d, --data <data>
570 (HTTP) Sends the specified data in a POST request to the HTTP
571 server, in the same way that a browser does when a user has
572 filled in an HTML form and presses the submit button. This will
573 cause curl to pass the data to the server using the content-type
574 application/x-www-form-urlencoded. Compare to -F, --form.
575
576 --data-raw is almost the same but does not have a special inter‐
577 pretation of the @ character. To post data purely binary, you
578 should instead use the --data-binary option. To URL-encode the
579 value of a form field you may use --data-urlencode.
580
581 If any of these options is used more than once on the same com‐
582 mand line, the data pieces specified will be merged together
583 with a separating &-symbol. Thus, using '-d name=daniel -d
584 skill=lousy' would generate a post chunk that looks like
585 'name=daniel&skill=lousy'.
586
587 If you start the data with the letter @, the rest should be a
588 file name to read the data from, or - if you want curl to read
589 the data from stdin. Multiple files can also be specified. Post‐
590 ing data from a file named from a file like that, carriage
591 returns and newlines will be stripped out. If you don't want the
592 @ character to have a special interpretation use --data-raw
593 instead.
594
595 See also --data-binary and --data-urlencode and --data-raw. This
596 option overrides -F, --form and -I, --head and -T, --upload-
597 file.
598
599 --delegation <LEVEL>
600 (GSS/kerberos) Set LEVEL to tell the server what it is allowed
601 to delegate when it comes to user credentials.
602
603 none Don't allow any delegation.
604
605 policy Delegates if and only if the OK-AS-DELEGATE flag is set
606 in the Kerberos service ticket, which is a matter of
607 realm policy.
608
609 always Unconditionally allow the server to delegate.
610
611 --digest
612 (HTTP) Enables HTTP Digest authentication. This is an authenti‐
613 cation scheme that prevents the password from being sent over
614 the wire in clear text. Use this in combination with the normal
615 -u, --user option to set user name and password.
616
617 If this option is used several times, only the first one is
618 used.
619
620 See also -u, --user and --proxy-digest and --anyauth. This
621 option overrides --basic and --ntlm and --negotiate.
622
623 --disable-eprt
624 (FTP) Tell curl to disable the use of the EPRT and LPRT commands
625 when doing active FTP transfers. Curl will normally always first
626 attempt to use EPRT, then LPRT before using PORT, but with this
627 option, it will use PORT right away. EPRT and LPRT are exten‐
628 sions to the original FTP protocol, and may not work on all
629 servers, but they enable more functionality in a better way than
630 the traditional PORT command.
631
632 --eprt can be used to explicitly enable EPRT again and --no-eprt
633 is an alias for --disable-eprt.
634
635 If the server is accessed using IPv6, this option will have no
636 effect as EPRT is necessary then.
637
638 Disabling EPRT only changes the active behavior. If you want to
639 switch to passive mode you need to not use -P, --ftp-port or
640 force it with --ftp-pasv.
641
642 --disable-epsv
643 (FTP) (FTP) Tell curl to disable the use of the EPSV command
644 when doing passive FTP transfers. Curl will normally always
645 first attempt to use EPSV before PASV, but with this option, it
646 will not try using EPSV.
647
648 --epsv can be used to explicitly enable EPSV again and --no-epsv
649 is an alias for --disable-epsv.
650
651 If the server is an IPv6 host, this option will have no effect
652 as EPSV is necessary then.
653
654 Disabling EPSV only changes the passive behavior. If you want to
655 switch to active mode you need to use -P, --ftp-port.
656
657 -q, --disable
658 If used as the first parameter on the command line, the curlrc
659 config file will not be read and used. See the -K, --config for
660 details on the default config file search path.
661
662 --disallow-username-in-url
663 (HTTP) This tells curl to exit if passed a url containing a
664 username.
665
666 See also --proto. Added in 7.61.0.
667
668 --dns-interface <interface>
669 (DNS) Tell curl to send outgoing DNS requests through <inter‐
670 face>. This option is a counterpart to --interface (which does
671 not affect DNS). The supplied string must be an interface name
672 (not an address).
673
674 See also --dns-ipv4-addr and --dns-ipv6-addr. --dns-interface
675 requires that the underlying libcurl was built to support c-
676 ares. Added in 7.33.0.
677
678 --dns-ipv4-addr <address>
679 (DNS) Tell curl to bind to <ip-address> when making IPv4 DNS
680 requests, so that the DNS requests originate from this address.
681 The argument should be a single IPv4 address.
682
683 See also --dns-interface and --dns-ipv6-addr. --dns-ipv4-addr
684 requires that the underlying libcurl was built to support c-
685 ares. Added in 7.33.0.
686
687 --dns-ipv6-addr <address>
688 (DNS) Tell curl to bind to <ip-address> when making IPv6 DNS
689 requests, so that the DNS requests originate from this address.
690 The argument should be a single IPv6 address.
691
692 See also --dns-interface and --dns-ipv4-addr. --dns-ipv6-addr
693 requires that the underlying libcurl was built to support c-
694 ares. Added in 7.33.0.
695
696 --dns-servers <addresses>
697 Set the list of DNS servers to be used instead of the system
698 default. The list of IP addresses should be separated with com‐
699 mas. Port numbers may also optionally be given as :<port-number>
700 after each IP address.
701
702 --dns-servers requires that the underlying libcurl was built to
703 support c-ares. Added in 7.33.0.
704
705 -D, --dump-header <filename>
706 (HTTP FTP) Write the received protocol headers to the specified
707 file.
708
709 This option is handy to use when you want to store the headers
710 that an HTTP site sends to you. Cookies from the headers could
711 then be read in a second curl invocation by using the -b,
712 --cookie option! The -c, --cookie-jar option is a better way to
713 store cookies.
714
715 When used in FTP, the FTP server response lines are considered
716 being "headers" and thus are saved there.
717
718 If this option is used several times, the last one will be used.
719
720 See also -o, --output.
721
722 --egd-file <file>
723 (TLS) Specify the path name to the Entropy Gathering Daemon
724 socket. The socket is used to seed the random engine for SSL
725 connections.
726
727 See also --random-file.
728
729 --engine <name>
730 (TLS) Select the OpenSSL crypto engine to use for cipher opera‐
731 tions. Use --engine list to print a list of build-time supported
732 engines. Note that not all (or none) of the engines may be
733 available at run-time.
734
735 --expect100-timeout <seconds>
736 (HTTP) Maximum time in seconds that you allow curl to wait for a
737 100-continue response when curl emits an Expects: 100-continue
738 header in its request. By default curl will wait one second.
739 This option accepts decimal values! When curl stops waiting, it
740 will continue as if the response has been received.
741
742 See also --connect-timeout. Added in 7.47.0.
743
744 --fail-early
745 Fail and exit on the first detected transfer error.
746
747 When curl is used to do multiple transfers on the command line,
748 it will attempt to operate on each given URL, one by one. By
749 default, it will ignore errors if there are more URLs given and
750 the last URL's success will determine the error code curl
751 returns. So early failures will be "hidden" by subsequent suc‐
752 cessful transfers.
753
754 Using this option, curl will instead return an error on the
755 first transfer that fails, independent of the amount of URLs
756 that are given on the command line. This way, no transfer fail‐
757 ures go undetected by scripts and similar.
758
759 This option is global and does not need to be specified for each
760 use of -:, --next.
761
762 This option does not imply -f, --fail, which causes transfers to
763 fail due to the server's HTTP status code. You can combine the
764 two options, however note -f, --fail is not global and is there‐
765 fore contained by -:, --next.
766
767 Added in 7.52.0.
768
769 -f, --fail
770 (HTTP) Fail silently (no output at all) on server errors. This
771 is mostly done to better enable scripts etc to better deal with
772 failed attempts. In normal cases when an HTTP server fails to
773 deliver a document, it returns an HTML document stating so
774 (which often also describes why and more). This flag will pre‐
775 vent curl from outputting that and return error 22.
776
777 This method is not fail-safe and there are occasions where non-
778 successful response codes will slip through, especially when
779 authentication is involved (response codes 401 and 407).
780
781 --false-start
782 (TLS) Tells curl to use false start during the TLS handshake.
783 False start is a mode where a TLS client will start sending
784 application data before verifying the server's Finished message,
785 thus saving a round trip when performing a full handshake.
786
787 This is currently only implemented in the NSS and Secure Trans‐
788 port (on iOS 7.0 or later, or OS X 10.9 or later) backends.
789
790 Added in 7.42.0.
791
792 --form-string <name=string>
793 (HTTP SMTP IMAP) Similar to -F, --form except that the value
794 string for the named parameter is used literally. Leading '@'
795 and '<' characters, and the ';type=' string in the value have no
796 special meaning. Use this in preference to -F, --form if there's
797 any possibility that the string value may accidentally trigger
798 the '@' or '<' features of -F, --form.
799
800 See also -F, --form.
801
802 -F, --form <name=content>
803 (HTTP SMTP IMAP) For HTTP protocol family, this lets curl emu‐
804 late a filled-in form in which a user has pressed the submit
805 button. This causes curl to POST data using the Content-Type
806 multipart/form-data according to RFC 2388.
807
808 For SMTP and IMAP protocols, this is the mean to compose a mul‐
809 tipart mail message to transmit.
810
811 This enables uploading of binary files etc. To force the 'con‐
812 tent' part to be a file, prefix the file name with an @ sign. To
813 just get the content part from a file, prefix the file name with
814 the symbol <. The difference between @ and < is then that @
815 makes a file get attached in the post as a file upload, while
816 the < makes a text field and just get the contents for that text
817 field from a file.
818
819 Tell curl to read content from stdin instead of a file by using
820 - as filename. This goes for both @ and < constructs. When stdin
821 is used, the contents is buffered in memory first by curl to
822 determine its size and allow a possible resend. Defining a
823 part's data from a named non-regular file (such as a named pipe
824 or similar) is unfortunately not subject to buffering and will
825 be effectively read at transmission time; since the full size is
826 unknown before the transfer starts, such data is sent as chunks
827 by HTTP and rejected by IMAP.
828
829 Example: send an image to an HTTP server, where 'profile' is the
830 name of the form-field to which the file portrait.jpg will be
831 the input:
832
833 curl -F profile=@portrait.jpg https://example.com/upload.cgi
834
835 Example: send a your name and shoe size in two text fields to
836 the server:
837
838 curl -F name=John -F shoesize=11 https://example.com/
839
840 Example: send a your essay in a text field to the server. Send
841 it as a plain text field, but get the contents for it from a
842 local file:
843
844 curl -F "story=<hugefile.txt" https://example.com/
845
846 You can also tell curl what Content-Type to use by using
847 'type=', in a manner similar to:
848
849 curl -F "web=@index.html;type=text/html" example.com
850
851 or
852
853 curl -F "name=daniel;type=text/foo" example.com
854
855 You can also explicitly change the name field of a file upload
856 part by setting filename=, like this:
857
858 curl -F "file=@localfile;filename=nameinpost" example.com
859
860 If filename/path contains ',' or ';', it must be quoted by dou‐
861 ble-quotes like:
862
863 curl -F "file=@\"localfile\";filename=\"nameinpost\"" exam‐
864 ple.com
865
866 or
867
868 curl -F 'file=@"localfile";filename="nameinpost"' example.com
869
870 Note that if a filename/path is quoted by double-quotes, any
871 double-quote or backslash within the filename must be escaped by
872 backslash.
873
874 Quoting must also be applied to non-file data if it contains
875 semicolons, leading/trailing spaces or leading double quotes:
876
877 curl -F 'colors="red; green; blue";type=text/x-myapp' exam‐
878 ple.com
879
880 You can add custom headers to the field by setting headers=,
881 like
882
883 curl -F "submit=OK;headers=\"X-submit-type: OK\"" example.com
884
885 or
886
887 curl -F "submit=OK;headers=@headerfile" example.com
888
889 The headers= keyword may appear more that once and above notes
890 about quoting apply. When headers are read from a file, Empty
891 lines and lines starting with '#' are comments and ignored; each
892 header can be folded by splitting between two words and starting
893 the continuation line with a space; embedded carriage-returns
894 and trailing spaces are stripped. Here is an example of a
895 header file contents:
896
897 # This file contain two headers.
898 X-header-1: this is a header
899
900 # The following header is folded.
901 X-header-2: this is
902 another header
903
904
905 To support sending multipart mail messages, the syntax is
906 extended as follows:
907 - name can be omitted: the equal sign is the first character of
908 the argument,
909 - if data starts with '(', this signals to start a new multi‐
910 part: it can be followed by a content type specification.
911 - a multipart can be terminated with a '=)' argument.
912
913 Example: the following command sends an SMTP mime e-mail con‐
914 sisting in an inline part in two alternative formats: plain text
915 and HTML. It attaches a text file:
916
917 curl -F '=(;type=multipart/alternative' \
918 -F '=plain text message' \
919 -F '= <body>HTML message</body>;type=text/html' \
920 -F '=)' -F '=@textfile.txt' ... smtp://example.com
921
922 Data can be encoded for transfer using encoder=. Available
923 encodings are binary and 8bit that do nothing else than adding
924 the corresponding Content-Transfer-Encoding header, 7bit that
925 only rejects 8-bit characters with a transfer error, quoted-
926 printable and base64 that encodes data according to the corre‐
927 sponding schemes, limiting lines length to 76 characters.
928
929 Example: send multipart mail with a quoted-printable text mes‐
930 sage and a base64 attached file:
931
932 curl -F '=text message;encoder=quoted-printable' \
933 -F '=@localfile;encoder=base64' ... smtp://example.com
934
935 See further examples and details in the MANUAL.
936
937 This option can be used multiple times.
938
939 This option overrides -d, --data and -I, --head and -T,
940 --upload-file.
941
942 --ftp-account <data>
943 (FTP) When an FTP server asks for "account data" after user name
944 and password has been provided, this data is sent off using the
945 ACCT command.
946
947 If this option is used several times, the last one will be used.
948
949 Added in 7.13.0.
950
951 --ftp-alternative-to-user <command>
952 (FTP) If authenticating with the USER and PASS commands fails,
953 send this command. When connecting to Tumbleweed's Secure
954 Transport server over FTPS using a client certificate, using
955 "SITE AUTH" will tell the server to retrieve the username from
956 the certificate.
957
958 Added in 7.15.5.
959
960 --ftp-create-dirs
961 (FTP SFTP) When an FTP or SFTP URL/operation uses a path that
962 doesn't currently exist on the server, the standard behavior of
963 curl is to fail. Using this option, curl will instead attempt to
964 create missing directories.
965
966 See also --create-dirs.
967
968 --ftp-method <method>
969 (FTP) Control what method curl should use to reach a file on an
970 FTP(S) server. The method argument should be one of the follow‐
971 ing alternatives:
972
973 multicwd
974 curl does a single CWD operation for each path part in
975 the given URL. For deep hierarchies this means very many
976 commands. This is how RFC 1738 says it should be done.
977 This is the default but the slowest behavior.
978
979 nocwd curl does no CWD at all. curl will do SIZE, RETR, STOR
980 etc and give a full path to the server for all these com‐
981 mands. This is the fastest behavior.
982
983 singlecwd
984 curl does one CWD with the full target directory and then
985 operates on the file "normally" (like in the multicwd
986 case). This is somewhat more standards compliant than
987 'nocwd' but without the full penalty of 'multicwd'.
988
989 Added in 7.15.1.
990
991 --ftp-pasv
992 (FTP) Use passive mode for the data connection. Passive is the
993 internal default behavior, but using this option can be used to
994 override a previous -P, --ftp-port option.
995
996 If this option is used several times, only the first one is
997 used. Undoing an enforced passive really isn't doable but you
998 must then instead enforce the correct -P, --ftp-port again.
999
1000 Passive mode means that curl will try the EPSV command first and
1001 then PASV, unless --disable-epsv is used.
1002
1003 See also --disable-epsv. Added in 7.11.0.
1004
1005 -P, --ftp-port <address>
1006 (FTP) Reverses the default initiator/listener roles when con‐
1007 necting with FTP. This option makes curl use active mode. curl
1008 then tells the server to connect back to the client's specified
1009 address and port, while passive mode asks the server to setup an
1010 IP address and port for it to connect to. <address> should be
1011 one of:
1012
1013 interface
1014 e.g. "eth0" to specify which interface's IP address you
1015 want to use (Unix only)
1016
1017 IP address
1018 e.g. "192.168.10.1" to specify the exact IP address
1019
1020 host name
1021 e.g. "my.host.domain" to specify the machine
1022
1023 - make curl pick the same IP address that is already used
1024 for the control connection
1025
1026 If this option is used several times, the last one will be used. Dis‐
1027 able the use of PORT with --ftp-pasv. Disable the attempt to use the
1028 EPRT command instead of PORT by using --disable-eprt. EPRT is really
1029 PORT++.
1030
1031 Since 7.19.5, you can append ":[start]-[end]" to the right of the
1032 address, to tell curl what TCP port range to use. That means you spec‐
1033 ify a port range, from a lower to a higher number. A single number
1034 works as well, but do note that it increases the risk of failure since
1035 the port may not be available.
1036
1037 See also --ftp-pasv and --disable-eprt.
1038
1039 --ftp-pret
1040 (FTP) Tell curl to send a PRET command before PASV (and EPSV).
1041 Certain FTP servers, mainly drftpd, require this non-standard
1042 command for directory listings as well as up and downloads in
1043 PASV mode.
1044
1045 Added in 7.20.0.
1046
1047 --ftp-skip-pasv-ip
1048 (FTP) Tell curl to not use the IP address the server suggests in
1049 its response to curl's PASV command when curl connects the data
1050 connection. Instead curl will re-use the same IP address it
1051 already uses for the control connection.
1052
1053 This option has no effect if PORT, EPRT or EPSV is used instead
1054 of PASV.
1055
1056 See also --ftp-pasv. Added in 7.14.2.
1057
1058 --ftp-ssl-ccc-mode <active/passive>
1059 (FTP) Sets the CCC mode. The passive mode will not initiate the
1060 shutdown, but instead wait for the server to do it, and will not
1061 reply to the shutdown from the server. The active mode initiates
1062 the shutdown and waits for a reply from the server.
1063
1064 See also --ftp-ssl-ccc. Added in 7.16.2.
1065
1066 --ftp-ssl-ccc
1067 (FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS
1068 layer after authenticating. The rest of the control channel com‐
1069 munication will be unencrypted. This allows NAT routers to fol‐
1070 low the FTP transaction. The default mode is passive.
1071
1072 See also --ssl and --ftp-ssl-ccc-mode. Added in 7.16.1.
1073
1074 --ftp-ssl-control
1075 (FTP) Require SSL/TLS for the FTP login, clear for transfer.
1076 Allows secure authentication, but non-encrypted data transfers
1077 for efficiency. Fails the transfer if the server doesn't sup‐
1078 port SSL/TLS.
1079
1080 Added in 7.16.0.
1081
1082 -G, --get
1083 When used, this option will make all data specified with -d,
1084 --data, --data-binary or --data-urlencode to be used in an HTTP
1085 GET request instead of the POST request that otherwise would be
1086 used. The data will be appended to the URL with a '?' separator.
1087
1088 If used in combination with -I, --head, the POST data will
1089 instead be appended to the URL with a HEAD request.
1090
1091 If this option is used several times, only the first one is
1092 used. This is because undoing a GET doesn't make sense, but you
1093 should then instead enforce the alternative method you prefer.
1094
1095 -g, --globoff
1096 This option switches off the "URL globbing parser". When you set
1097 this option, you can specify URLs that contain the letters {}[]
1098 without having them being interpreted by curl itself. Note that
1099 these letters are not normal legal URL contents but they should
1100 be encoded according to the URI standard.
1101
1102 --happy-eyeballs-timeout-ms <milliseconds>
1103 Happy eyeballs is an algorithm that attempts to connect to both
1104 IPv4 and IPv6 addresses for dual-stack hosts, preferring IPv6
1105 first for the number of milliseconds. If the IPv6 address cannot
1106 be connected to within that time then a connection attempt is
1107 made to the IPv4 address in parallel. The first connection to be
1108 established is the one that is used.
1109
1110 The range of suggested useful values is limited. Happy Eyeballs
1111 RFC 6555 says "It is RECOMMENDED that connection attempts be
1112 paced 150-250 ms apart to balance human factors against network
1113 load." libcurl currently defaults to 200 ms. Firefox and Chrome
1114 currently default to 300 ms.
1115
1116 If this option is used several times, the last one will be used.
1117
1118 Added in 7.59.0.
1119
1120 --haproxy-protocol
1121 (HTTP) Send a HAProxy PROXY protocol v1 header at the beginning
1122 of the connection. This is used by some load balancers and
1123 reverse proxies to indicate the client's true IP address and
1124 port.
1125
1126 This option is primarily useful when sending test requests to a
1127 service that expects this header.
1128
1129 Added in 7.60.0.
1130
1131 -I, --head
1132 (HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the
1133 command HEAD which this uses to get nothing but the header of a
1134 document. When used on an FTP or FILE file, curl displays the
1135 file size and last modification time only.
1136
1137 -H, --header <header/@file>
1138 (HTTP) Extra header to include in the request when sending HTTP
1139 to a server. You may specify any number of extra headers. Note
1140 that if you should add a custom header that has the same name as
1141 one of the internal ones curl would use, your externally set
1142 header will be used instead of the internal one. This allows you
1143 to make even trickier stuff than curl would normally do. You
1144 should not replace internally set headers without knowing per‐
1145 fectly well what you're doing. Remove an internal header by giv‐
1146 ing a replacement without content on the right side of the
1147 colon, as in: -H "Host:". If you send the custom header with no-
1148 value then its header must be terminated with a semicolon, such
1149 as -H "X-Custom-Header;" to send "X-Custom-Header:".
1150
1151 curl will make sure that each header you add/replace is sent
1152 with the proper end-of-line marker, you should thus not add that
1153 as a part of the header content: do not add newlines or carriage
1154 returns, they will only mess things up for you.
1155
1156 Starting in 7.55.0, this option can take an argument in @file‐
1157 name style, which then adds a header for each line in the input
1158 file. Using @- will make curl read the header file from stdin.
1159
1160 See also the -A, --user-agent and -e, --referer options.
1161
1162 Starting in 7.37.0, you need --proxy-header to send custom head‐
1163 ers intended for a proxy.
1164
1165 Example:
1166
1167 curl -H "X-First-Name: Joe" http://example.com/
1168
1169 WARNING: headers set with this option will be set in all
1170 requests - even after redirects are followed, like when told
1171 with -L, --location. This can lead to the header being sent to
1172 other hosts than the original host, so sensitive headers should
1173 be used with caution combined with following redirects.
1174
1175 This option can be used multiple times to add/replace/remove
1176 multiple headers.
1177
1178 -h, --help
1179 Usage help. This lists all current command line options with a
1180 short description.
1181
1182 --hostpubmd5 <md5>
1183 (SFTP SCP) Pass a string containing 32 hexadecimal digits. The
1184 string should be the 128 bit MD5 checksum of the remote host's
1185 public key, curl will refuse the connection with the host unless
1186 the md5sums match.
1187
1188 Added in 7.17.1.
1189
1190 -0, --http1.0
1191 (HTTP) Tells curl to use HTTP version 1.0 instead of using its
1192 internally preferred HTTP version.
1193
1194 This option overrides --http1.1 and --http2.
1195
1196 --http1.1
1197 (HTTP) Tells curl to use HTTP version 1.1.
1198
1199 This option overrides -0, --http1.0 and --http2. Added in
1200 7.33.0.
1201
1202 --http2-prior-knowledge
1203 (HTTP) Tells curl to issue its non-TLS HTTP requests using
1204 HTTP/2 without HTTP/1.1 Upgrade. It requires prior knowledge
1205 that the server supports HTTP/2 straight away. HTTPS requests
1206 will still do HTTP/2 the standard way with negotiated protocol
1207 version in the TLS handshake.
1208
1209 --http2-prior-knowledge requires that the underlying libcurl was
1210 built to support HTTP/2. This option overrides --http1.1 and -0,
1211 --http1.0 and --http2. Added in 7.49.0.
1212
1213 --http2
1214 (HTTP) Tells curl to use HTTP version 2.
1215
1216 See also --no-alpn. --http2 requires that the underlying libcurl
1217 was built to support HTTP/2. This option overrides --http1.1 and
1218 -0, --http1.0 and --http2-prior-knowledge. Added in 7.33.0.
1219
1220 --ignore-content-length
1221 (FTP HTTP) For HTTP, Ignore the Content-Length header. This is
1222 particularly useful for servers running Apache 1.x, which will
1223 report incorrect Content-Length for files larger than 2 giga‐
1224 bytes.
1225
1226 For FTP (since 7.46.0), skip the RETR command to figure out the
1227 size before downloading a file.
1228
1229 -i, --include
1230 Include the HTTP response headers in the output. The HTTP
1231 response headers can include things like server name, cookies,
1232 date of the document, HTTP version and more...
1233
1234 To view the request headers, consider the -v, --verbose option.
1235
1236 See also -v, --verbose.
1237
1238 -k, --insecure
1239 (TLS) By default, every SSL connection curl makes is verified to
1240 be secure. This option allows curl to proceed and operate even
1241 for server connections otherwise considered insecure.
1242
1243 The server connection is verified by making sure the server's
1244 certificate contains the right name and verifies successfully
1245 using the cert store.
1246
1247 See this online resource for further details:
1248 https://curl.haxx.se/docs/sslcerts.html
1249
1250 See also --proxy-insecure and --cacert.
1251
1252 --interface <name>
1253
1254 Perform an operation using a specified interface. You can enter
1255 interface name, IP address or host name. An example could look
1256 like:
1257
1258 curl --interface eth0:1 https://www.example.com/
1259
1260 If this option is used several times, the last one will be used.
1261
1262 On Linux it can be used to specify a VRF, but the binary needs
1263 to either have CAP_NET_RAW or to be run as root. More informa‐
1264 tion about Linux VRF: https://www.kernel.org/doc/Documenta‐
1265 tion/networking/vrf.txt
1266
1267 See also --dns-interface.
1268
1269 -4, --ipv4
1270 This option tells curl to resolve names to IPv4 addresses only,
1271 and not for example try IPv6.
1272
1273 See also --http1.1 and --http2. This option overrides -6,
1274 --ipv6.
1275
1276 -6, --ipv6
1277 This option tells curl to resolve names to IPv6 addresses only,
1278 and not for example try IPv4.
1279
1280 See also --http1.1 and --http2. This option overrides -6,
1281 --ipv6.
1282
1283 -j, --junk-session-cookies
1284 (HTTP) When curl is told to read cookies from a given file, this
1285 option will make it discard all "session cookies". This will
1286 basically have the same effect as if a new session is started.
1287 Typical browsers always discard session cookies when they're
1288 closed down.
1289
1290 See also -b, --cookie and -c, --cookie-jar.
1291
1292 --keepalive-time <seconds>
1293 This option sets the time a connection needs to remain idle
1294 before sending keepalive probes and the time between individual
1295 keepalive probes. It is currently effective on operating systems
1296 offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options
1297 (meaning Linux, recent AIX, HP-UX and more). This option has no
1298 effect if --no-keepalive is used.
1299
1300 If this option is used several times, the last one will be used.
1301 If unspecified, the option defaults to 60 seconds.
1302
1303 Added in 7.18.0.
1304
1305 --key-type <type>
1306 (TLS) Private key file type. Specify which type your --key pro‐
1307 vided private key is. DER, PEM, and ENG are supported. If not
1308 specified, PEM is assumed.
1309
1310 If this option is used several times, the last one will be used.
1311
1312 --key <key>
1313 (TLS SSH) Private key file name. Allows you to provide your pri‐
1314 vate key in this separate file. For SSH, if not specified, curl
1315 tries the following candidates in order:
1316
1317 If curl is built against OpenSSL library, and the engine pkcs11
1318 is available, then a PKCS#11 URI (RFC 7512) can be used to spec‐
1319 ify a private key located in a PKCS#11 device. A string begin‐
1320 ning with "pkcs11:" will be interpreted as a PKCS#11 URI. If a
1321 PKCS#11 URI is provided, then the --engine option will be set as
1322 "pkcs11" if none was provided and the --key-type option will be
1323 set as "ENG" if none was provided.
1324
1325 If this option is used several times, the last one will be used.
1326
1327 --krb <level>
1328 (FTP) Enable Kerberos authentication and use. The level must be
1329 entered and should be one of 'clear', 'safe', 'confidential', or
1330 'private'. Should you use a level that is not one of these,
1331 'private' will instead be used.
1332
1333 If this option is used several times, the last one will be used.
1334
1335 --krb requires that the underlying libcurl was built to support
1336 Kerberos.
1337
1338 --libcurl <file>
1339 Append this option to any ordinary curl command line, and you
1340 will get a libcurl-using C source code written to the file that
1341 does the equivalent of what your command-line operation does!
1342
1343 If this option is used several times, the last given file name
1344 will be used.
1345
1346 Added in 7.16.1.
1347
1348 --limit-rate <speed>
1349 Specify the maximum transfer rate you want curl to use - for
1350 both downloads and uploads. This feature is useful if you have a
1351 limited pipe and you'd like your transfer not to use your entire
1352 bandwidth. To make it slower than it otherwise would be.
1353
1354 The given speed is measured in bytes/second, unless a suffix is
1355 appended. Appending 'k' or 'K' will count the number as kilo‐
1356 bytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
1357 gigabytes. Examples: 200K, 3m and 1G.
1358
1359 If you also use the -Y, --speed-limit option, that option will
1360 take precedence and might cripple the rate-limiting slightly, to
1361 help keeping the speed-limit logic working.
1362
1363 If this option is used several times, the last one will be used.
1364
1365 -l, --list-only
1366 (FTP POP3) (FTP) When listing an FTP directory, this switch
1367 forces a name-only view. This is especially useful if the user
1368 wants to machine-parse the contents of an FTP directory since
1369 the normal directory view doesn't use a standard look or format.
1370 When used like this, the option causes a NLST command to be sent
1371 to the server instead of LIST.
1372
1373 Note: Some FTP servers list only files in their response to
1374 NLST; they do not include sub-directories and symbolic links.
1375
1376 (POP3) When retrieving a specific email from POP3, this switch
1377 forces a LIST command to be performed instead of RETR. This is
1378 particularly useful if the user wants to see if a specific mes‐
1379 sage id exists on the server and what size it is.
1380
1381 Note: When combined with -X, --request, this option can be used
1382 to send an UIDL command instead, so the user may use the email's
1383 unique identifier rather than it's message id to make the
1384 request.
1385
1386 Added in 7.21.5.
1387
1388 --local-port <num/range>
1389 Set a preferred single number or range (FROM-TO) of local port
1390 numbers to use for the connection(s). Note that port numbers by
1391 nature are a scarce resource that will be busy at times so set‐
1392 ting this range to something too narrow might cause unnecessary
1393 connection setup failures.
1394
1395 Added in 7.15.2.
1396
1397 --location-trusted
1398 (HTTP) Like -L, --location, but will allow sending the name +
1399 password to all hosts that the site may redirect to. This may or
1400 may not introduce a security breach if the site redirects you to
1401 a site to which you'll send your authentication info (which is
1402 plaintext in the case of HTTP Basic authentication).
1403
1404 See also -u, --user.
1405
1406 -L, --location
1407 (HTTP) If the server reports that the requested page has moved
1408 to a different location (indicated with a Location: header and a
1409 3XX response code), this option will make curl redo the request
1410 on the new place. If used together with -i, --include or -I,
1411 --head, headers from all requested pages will be shown. When
1412 authentication is used, curl only sends its credentials to the
1413 initial host. If a redirect takes curl to a different host, it
1414 won't be able to intercept the user+password. See also --loca‐
1415 tion-trusted on how to change this. You can limit the amount of
1416 redirects to follow by using the --max-redirs option.
1417
1418 When curl follows a redirect and the request is not a plain GET
1419 (for example POST or PUT), it will do the following request with
1420 a GET if the HTTP response was 301, 302, or 303. If the response
1421 code was any other 3xx code, curl will re-send the following
1422 request using the same unmodified method.
1423
1424 You can tell curl to not change the non-GET request method to
1425 GET after a 30x response by using the dedicated options for
1426 that: --post301, --post302 and --post303.
1427
1428 --login-options <options>
1429 (IMAP POP3 SMTP) Specify the login options to use during server
1430 authentication.
1431
1432 You can use the login options to specify protocol specific
1433 options that may be used during authentication. At present only
1434 IMAP, POP3 and SMTP support login options. For more information
1435 about the login options please see RFC 2384, RFC 5092 and IETF
1436 draft draft-earhart-url-smtp-00.txt
1437
1438 If this option is used several times, the last one will be used.
1439
1440 Added in 7.34.0.
1441
1442 --mail-auth <address>
1443 (SMTP) Specify a single address. This will be used to specify
1444 the authentication address (identity) of a submitted message
1445 that is being relayed to another server.
1446
1447 See also --mail-rcpt and --mail-from. Added in 7.25.0.
1448
1449 --mail-from <address>
1450 (SMTP) Specify a single address that the given mail should get
1451 sent from.
1452
1453 See also --mail-rcpt and --mail-auth. Added in 7.20.0.
1454
1455 --mail-rcpt <address>
1456 (SMTP) Specify a single address, user name or mailing list name.
1457 Repeat this option several times to send to multiple recipients.
1458
1459 When performing a mail transfer, the recipient should specify a
1460 valid email address to send the mail to.
1461
1462 When performing an address verification (VRFY command), the
1463 recipient should be specified as the user name or user name and
1464 domain (as per Section 3.5 of RFC5321). (Added in 7.34.0)
1465
1466 When performing a mailing list expand (EXPN command), the recip‐
1467 ient should be specified using the mailing list name, such as
1468 "Friends" or "London-Office". (Added in 7.34.0)
1469
1470 Added in 7.20.0.
1471
1472 -M, --manual
1473 Manual. Display the huge help text.
1474
1475 --max-filesize <bytes>
1476 Specify the maximum size (in bytes) of a file to download. If
1477 the file requested is larger than this value, the transfer will
1478 not start and curl will return with exit code 63.
1479
1480 A size modifier may be used. For example, Appending 'k' or 'K'
1481 will count the number as kilobytes, 'm' or 'M' makes it
1482 megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K,
1483 3m and 1G. (Added in 7.58.0)
1484
1485 NOTE: The file size is not always known prior to download, and
1486 for such files this option has no effect even if the file trans‐
1487 fer ends up being larger than this given limit. This concerns
1488 both FTP and HTTP transfers.
1489
1490 See also --limit-rate.
1491
1492 --max-redirs <num>
1493 (HTTP) Set maximum number of redirection-followings allowed.
1494 When -L, --location is used, is used to prevent curl from fol‐
1495 lowing redirections "in absurdum". By default, the limit is set
1496 to 50 redirections. Set this option to -1 to make it unlimited.
1497
1498 If this option is used several times, the last one will be used.
1499
1500 -m, --max-time <seconds>
1501 Maximum time in seconds that you allow the whole operation to
1502 take. This is useful for preventing your batch jobs from hang‐
1503 ing for hours due to slow networks or links going down. Since
1504 7.32.0, this option accepts decimal values, but the actual time‐
1505 out will decrease in accuracy as the specified timeout increases
1506 in decimal precision.
1507
1508 If this option is used several times, the last one will be used.
1509
1510 See also --connect-timeout.
1511
1512 --metalink
1513 This option can tell curl to parse and process a given URI as
1514 Metalink file (both version 3 and 4 (RFC 5854) are supported)
1515 and make use of the mirrors listed within for failover if there
1516 are errors (such as the file or server not being available). It
1517 will also verify the hash of the file after the download com‐
1518 pletes. The Metalink file itself is downloaded and processed in
1519 memory and not stored in the local file system.
1520
1521 Example to use a remote Metalink file:
1522
1523 curl --metalink http://www.example.com/example.metalink
1524
1525 To use a Metalink file in the local file system, use FILE proto‐
1526 col (file://):
1527
1528 curl --metalink file://example.metalink
1529
1530 Please note that if FILE protocol is disabled, there is no way
1531 to use a local Metalink file at the time of this writing. Also
1532 note that if --metalink and -i, --include are used together,
1533 --include will be ignored. This is because including headers in
1534 the response will break Metalink parser and if the headers are
1535 included in the file described in Metalink file, hash check will
1536 fail.
1537
1538
1539 --metalink requires that the underlying libcurl was built to
1540 support metalink. Added in 7.27.0.
1541
1542 --negotiate
1543 (HTTP) Enables Negotiate (SPNEGO) authentication.
1544
1545 This option requires a library built with GSS-API or SSPI sup‐
1546 port. Use -V, --version to see if your curl supports GSS-
1547 API/SSPI or SPNEGO.
1548
1549 When using this option, you must also provide a fake -u, --user
1550 option to activate the authentication code properly. Sending a
1551 '-u :' is enough as the user name and password from the -u,
1552 --user option aren't actually used.
1553
1554 If this option is used several times, only the first one is
1555 used.
1556
1557 See also --basic and --ntlm and --anyauth and --proxy-negotiate.
1558
1559 --netrc-file <filename>
1560 This option is similar to -n, --netrc, except that you provide
1561 the path (absolute or relative) to the netrc file that Curl
1562 should use. You can only specify one netrc file per invocation.
1563 If several --netrc-file options are provided, the last one will
1564 be used.
1565
1566 It will abide by --netrc-optional if specified.
1567
1568 This option overrides -n, --netrc. Added in 7.21.5.
1569
1570 --netrc-optional
1571 Very similar to -n, --netrc, but this option makes the .netrc
1572 usage optional and not mandatory as the -n, --netrc option does.
1573
1574 See also --netrc-file. This option overrides -n, --netrc.
1575
1576 -n, --netrc
1577 Makes curl scan the .netrc (_netrc on Windows) file in the
1578 user's home directory for login name and password. This is typi‐
1579 cally used for FTP on Unix. If used with HTTP, curl will enable
1580 user authentication. See netrc(5) ftp(1) for details on the file
1581 format. Curl will not complain if that file doesn't have the
1582 right permissions (it should not be either world- or group-read‐
1583 able). The environment variable "HOME" is used to find the home
1584 directory.
1585
1586 A quick and very simple example of how to setup a .netrc to
1587 allow curl to FTP to the machine host.domain.com with user name
1588 'myself' and password 'secret' should look similar to:
1589
1590 machine host.domain.com login myself password secret
1591
1592 -:, --next
1593 Tells curl to use a separate operation for the following URL and
1594 associated options. This allows you to send several URL
1595 requests, each with their own specific options, for example,
1596 such as different user names or custom requests for each.
1597
1598 -:, --next will reset all local options and only global ones
1599 will have their values survive over to the operation following
1600 the -:, --next instruction. Global options include -v, --ver‐
1601 bose, --trace, --trace-ascii and --fail-early.
1602
1603 For example, you can do both a GET and a POST in a single com‐
1604 mand line:
1605
1606 curl www1.example.com --next -d postthis www2.example.com
1607
1608 Added in 7.36.0.
1609
1610 --no-alpn
1611 (HTTPS) Disable the ALPN TLS extension. ALPN is enabled by
1612 default if libcurl was built with an SSL library that supports
1613 ALPN. ALPN is used by a libcurl that supports HTTP/2 to negoti‐
1614 ate HTTP/2 support with the server during https sessions.
1615
1616 See also --no-npn and --http2. --no-alpn requires that the
1617 underlying libcurl was built to support TLS. Added in 7.36.0.
1618
1619 -N, --no-buffer
1620 Disables the buffering of the output stream. In normal work sit‐
1621 uations, curl will use a standard buffered output stream that
1622 will have the effect that it will output the data in chunks, not
1623 necessarily exactly when the data arrives. Using this option
1624 will disable that buffering.
1625
1626 Note that this is the negated option name documented. You can
1627 thus use --buffer to enforce the buffering.
1628
1629 --no-keepalive
1630 Disables the use of keepalive messages on the TCP connection.
1631 curl otherwise enables them by default.
1632
1633 Note that this is the negated option name documented. You can
1634 thus use --keepalive to enforce keepalive.
1635
1636 --no-npn
1637 (HTTPS) Disable the NPN TLS extension. NPN is enabled by default
1638 if libcurl was built with an SSL library that supports NPN. NPN
1639 is used by a libcurl that supports HTTP/2 to negotiate HTTP/2
1640 support with the server during https sessions.
1641
1642 See also --no-alpn and --http2. --no-npn requires that the
1643 underlying libcurl was built to support TLS. Added in 7.36.0.
1644
1645 --no-sessionid
1646 (TLS) Disable curl's use of SSL session-ID caching. By default
1647 all transfers are done using the cache. Note that while nothing
1648 should ever get hurt by attempting to reuse SSL session-IDs,
1649 there seem to be broken SSL implementations in the wild that may
1650 require you to disable this in order for you to succeed.
1651
1652 Note that this is the negated option name documented. You can
1653 thus use --sessionid to enforce session-ID caching.
1654
1655 Added in 7.16.0.
1656
1657 --noproxy <no-proxy-list>
1658 Comma-separated list of hosts which do not use a proxy, if one
1659 is specified. The only wildcard is a single * character, which
1660 matches all hosts, and effectively disables the proxy. Each name
1661 in this list is matched as either a domain which contains the
1662 hostname, or the hostname itself. For example, local.com would
1663 match local.com, local.com:80, and www.local.com, but not
1664 www.notlocal.com.
1665
1666 Since 7.53.0, This option overrides the environment variables
1667 that disable the proxy. If there's an environment variable dis‐
1668 abling a proxy, you can set noproxy list to "" to override it.
1669
1670 Added in 7.19.4.
1671
1672 --ntlm-wb
1673 (HTTP) Enables NTLM much in the style --ntlm does, but hand over
1674 the authentication to the separate binary ntlmauth application
1675 that is executed when needed.
1676
1677 See also --ntlm and --proxy-ntlm.
1678
1679 --ntlm (HTTP) Enables NTLM authentication. The NTLM authentication
1680 method was designed by Microsoft and is used by IIS web servers.
1681 It is a proprietary protocol, reverse-engineered by clever peo‐
1682 ple and implemented in curl based on their efforts. This kind of
1683 behavior should not be endorsed, you should encourage everyone
1684 who uses NTLM to switch to a public and documented authentica‐
1685 tion method instead, such as Digest.
1686
1687 If you want to enable NTLM for your proxy authentication, then
1688 use --proxy-ntlm.
1689
1690 If this option is used several times, only the first one is
1691 used.
1692
1693 See also --proxy-ntlm. --ntlm requires that the underlying
1694 libcurl was built to support TLS. This option overrides --basic
1695 and --negotiate and --digest and --anyauth.
1696
1697 --oauth2-bearer <token>
1698 (IMAP POP3 SMTP) Specify the Bearer Token for OAUTH 2.0 server
1699 authentication. The Bearer Token is used in conjunction with the
1700 user name which can be specified as part of the --url or -u,
1701 --user options.
1702
1703 The Bearer Token and user name are formatted according to RFC
1704 6750.
1705
1706 If this option is used several times, the last one will be used.
1707
1708 -o, --output <file>
1709 Write output to <file> instead of stdout. If you are using {} or
1710 [] to fetch multiple documents, you can use '#' followed by a
1711 number in the <file> specifier. That variable will be replaced
1712 with the current string for the URL being fetched. Like in:
1713
1714 curl http://{one,two}.example.com -o "file_#1.txt"
1715
1716 or use several variables like:
1717
1718 curl http://{site,host}.host[1-5].com -o "#1_#2"
1719
1720 You may use this option as many times as the number of URLs you
1721 have. For example, if you specify two URLs on the same command
1722 line, you can use it like this:
1723
1724 curl -o aa example.com -o bb example.net
1725
1726 and the order of the -o options and the URLs doesn't matter,
1727 just that the first -o is for the first URL and so on, so the
1728 above command line can also be written as
1729
1730 curl example.com example.net -o aa -o bb
1731
1732 See also the --create-dirs option to create the local directo‐
1733 ries dynamically. Specifying the output as '-' (a single dash)
1734 will force the output to be done to stdout.
1735
1736 See also -O, --remote-name and --remote-name-all and -J,
1737 --remote-header-name.
1738
1739 --pass <phrase>
1740 (SSH TLS) Passphrase for the private key
1741
1742 If this option is used several times, the last one will be used.
1743
1744 --path-as-is
1745 Tell curl to not handle sequences of /../ or /./ in the given
1746 URL path. Normally curl will squash or merge them according to
1747 standards but with this option set you tell it not to do that.
1748
1749 Added in 7.42.0.
1750
1751 --pinnedpubkey <hashes>
1752 (TLS) Tells curl to use the specified public key file (or
1753 hashes) to verify the peer. This can be a path to a file which
1754 contains a single public key in PEM or DER format, or any number
1755 of base64 encoded sha256 hashes preceded by ´sha256//´ and sepa‐
1756 rated by ´;´
1757
1758 When negotiating a TLS or SSL connection, the server sends a
1759 certificate indicating its identity. A public key is extracted
1760 from this certificate and if it does not exactly match the pub‐
1761 lic key provided to this option, curl will abort the connection
1762 before sending or receiving any data.
1763
1764 PEM/DER support:
1765 7.39.0: OpenSSL, GnuTLS and GSKit
1766 7.43.0: NSS and wolfSSL/CyaSSL
1767 7.47.0: mbedtls
1768 7.49.0: PolarSSL sha256 support:
1769 7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL.
1770 7.47.0: mbedtls
1771 7.49.0: PolarSSL Other SSL backends not supported.
1772
1773 If this option is used several times, the last one will be used.
1774
1775 --post301
1776 (HTTP) Tells curl to respect RFC 7231/6.4.2 and not convert POST
1777 requests into GET requests when following a 301 redirection. The
1778 non-RFC behaviour is ubiquitous in web browsers, so curl does
1779 the conversion by default to maintain consistency. However, a
1780 server may require a POST to remain a POST after such a redi‐
1781 rection. This option is meaningful only when using -L, --loca‐
1782 tion.
1783
1784 See also --post302 and --post303 and -L, --location. Added in
1785 7.17.1.
1786
1787 --post302
1788 (HTTP) Tells curl to respect RFC 7231/6.4.3 and not convert POST
1789 requests into GET requests when following a 302 redirection. The
1790 non-RFC behaviour is ubiquitous in web browsers, so curl does
1791 the conversion by default to maintain consistency. However, a
1792 server may require a POST to remain a POST after such a redi‐
1793 rection. This option is meaningful only when using -L, --loca‐
1794 tion.
1795
1796 See also --post301 and --post303 and -L, --location. Added in
1797 7.19.1.
1798
1799 --post303
1800 (HTTP) Tells curl to violate RFC 7231/6.4.4 and not convert POST
1801 requests into GET requests when following 303 redirections. A
1802 server may require a POST to remain a POST after a 303 redirect‐
1803 ion. This option is meaningful only when using -L, --location.
1804
1805 See also --post302 and --post301 and -L, --location. Added in
1806 7.26.0.
1807
1808 --preproxy [protocol://]host[:port]
1809 Use the specified SOCKS proxy before connecting to an HTTP or
1810 HTTPS -x, --proxy. In such a case curl first connects to the
1811 SOCKS proxy and then connects (through SOCKS) to the HTTP or
1812 HTTPS proxy. Hence pre proxy.
1813
1814 The pre proxy string should be specified with a protocol:// pre‐
1815 fix to specify alternative proxy protocols. Use socks4://,
1816 socks4a://, socks5:// or socks5h:// to request the specific
1817 SOCKS version to be used. No protocol specified will make curl
1818 default to SOCKS4.
1819
1820 If the port number is not specified in the proxy string, it is
1821 assumed to be 1080.
1822
1823 User and password that might be provided in the proxy string are
1824 URL decoded by curl. This allows you to pass in special charac‐
1825 ters such as @ by using %40 or pass in a colon with %3a.
1826
1827 If this option is used several times, the last one will be used.
1828
1829 Added in 7.52.0.
1830
1831 -#, --progress-bar
1832 Make curl display transfer progress as a simple progress bar
1833 instead of the standard, more informational, meter.
1834
1835 This progress bar draws a single line of '#' characters across
1836 the screen and shows a percentage if the transfer size is known.
1837 For transfers without a known size, there will be space ship
1838 (-=o=-) that moves back and forth but only while data is being
1839 transferred, with a set of flying hash sign symbols on top.
1840
1841 --proto-default <protocol>
1842 Tells curl to use protocol for any URL missing a scheme name.
1843
1844 Example:
1845
1846 curl --proto-default https ftp.mozilla.org
1847
1848 An unknown or unsupported protocol causes error CURLE_UNSUP‐
1849 PORTED_PROTOCOL (1).
1850
1851 This option does not change the default proxy protocol (http).
1852
1853 Without this option curl would make a guess based on the host,
1854 see --url for details.
1855
1856 Added in 7.45.0.
1857
1858 --proto-redir <protocols>
1859 Tells curl to limit what protocols it may use on redirect. Pro‐
1860 tocols denied by --proto are not overridden by this option. See
1861 --proto for how protocols are represented.
1862
1863 Example, allow only HTTP and HTTPS on redirect:
1864
1865 curl --proto-redir -all,http,https http://example.com
1866
1867 By default curl will allow all protocols on redirect except sev‐
1868 eral disabled for security reasons: Since 7.19.4 FILE and SCP
1869 are disabled, and since 7.40.0 SMB and SMBS are also disabled.
1870 Specifying all or +all enables all protocols on redirect,
1871 including those disabled for security.
1872
1873 Added in 7.20.2.
1874
1875 --proto <protocols>
1876 Tells curl to limit what protocols it may use in the transfer.
1877 Protocols are evaluated left to right, are comma separated, and
1878 are each a protocol name or
1879
1880 + Permit this protocol in addition to protocols already permit‐
1881 ted (this is the default if no modifier is used).
1882
1883 - Deny this protocol, removing it from the list of protocols
1884 already permitted.
1885
1886 = Permit only this protocol (ignoring the list already permit‐
1887 ted), though subject to later modification by subsequent
1888 entries in the comma separated list.
1889
1890 For example:
1891
1892 --proto -ftps uses the default protocols, but disables ftps
1893
1894 --proto -all,https,+http
1895 only enables http and https
1896
1897 --proto =http,https
1898 also only enables http and https
1899
1900 Unknown protocols produce a warning. This allows scripts to safely rely
1901 on being able to disable potentially dangerous protocols, without rely‐
1902 ing upon support for that protocol being built into curl to avoid an
1903 error.
1904
1905 This option can be used multiple times, in which case the effect is the
1906 same as concatenating the protocols into one instance of the option.
1907
1908 See also --proto-redir and --proto-default. Added in 7.20.2.
1909
1910 --proxy-anyauth
1911 Tells curl to pick a suitable authentication method when commu‐
1912 nicating with the given HTTP proxy. This might cause an extra
1913 request/response round-trip.
1914
1915 See also -x, --proxy and --proxy-basic and --proxy-digest. Added
1916 in 7.13.2.
1917
1918 --proxy-basic
1919 Tells curl to use HTTP Basic authentication when communicating
1920 with the given proxy. Use --basic for enabling HTTP Basic with a
1921 remote host. Basic is the default authentication method curl
1922 uses with proxies.
1923
1924 See also -x, --proxy and --proxy-anyauth and --proxy-digest.
1925
1926 --proxy-cacert <file>
1927 Same as --cacert but used in HTTPS proxy context.
1928
1929 See also --proxy-capath and --cacert and --capath and -x,
1930 --proxy. Added in 7.52.0.
1931
1932 --proxy-capath <dir>
1933 Same as --capath but used in HTTPS proxy context.
1934
1935 See also --proxy-cacert and -x, --proxy and --capath. Added in
1936 7.52.0.
1937
1938 --proxy-cert-type <type>
1939 Same as --cert-type but used in HTTPS proxy context.
1940
1941 Added in 7.52.0.
1942
1943 --proxy-cert <cert[:passwd]>
1944 Same as -E, --cert but used in HTTPS proxy context.
1945
1946 Added in 7.52.0.
1947
1948 --proxy-ciphers <list>
1949 Same as --ciphers but used in HTTPS proxy context.
1950
1951 Added in 7.52.0.
1952
1953 --proxy-crlfile <file>
1954 Same as --crlfile but used in HTTPS proxy context.
1955
1956 Added in 7.52.0.
1957
1958 --proxy-digest
1959 Tells curl to use HTTP Digest authentication when communicating
1960 with the given proxy. Use --digest for enabling HTTP Digest with
1961 a remote host.
1962
1963 See also -x, --proxy and --proxy-anyauth and --proxy-basic.
1964
1965 --proxy-header <header/@file>
1966 (HTTP) Extra header to include in the request when sending HTTP
1967 to a proxy. You may specify any number of extra headers. This is
1968 the equivalent option to -H, --header but is for proxy communi‐
1969 cation only like in CONNECT requests when you want a separate
1970 header sent to the proxy to what is sent to the actual remote
1971 host.
1972
1973 curl will make sure that each header you add/replace is sent
1974 with the proper end-of-line marker, you should thus not add that
1975 as a part of the header content: do not add newlines or carriage
1976 returns, they will only mess things up for you.
1977
1978 Headers specified with this option will not be included in
1979 requests that curl knows will not be sent to a proxy.
1980
1981 Starting in 7.55.0, this option can take an argument in @file‐
1982 name style, which then adds a header for each line in the input
1983 file. Using @- will make curl read the header file from stdin.
1984
1985 This option can be used multiple times to add/replace/remove
1986 multiple headers.
1987
1988 Added in 7.37.0.
1989
1990 --proxy-insecure
1991 Same as -k, --insecure but used in HTTPS proxy context.
1992
1993 Added in 7.52.0.
1994
1995 --proxy-key-type <type>
1996 Same as --key-type but used in HTTPS proxy context.
1997
1998 Added in 7.52.0.
1999
2000 --proxy-key <key>
2001 Same as --key but used in HTTPS proxy context.
2002
2003 --proxy-negotiate
2004 Tells curl to use HTTP Negotiate (SPNEGO) authentication when
2005 communicating with the given proxy. Use --negotiate for enabling
2006 HTTP Negotiate (SPNEGO) with a remote host.
2007
2008 See also --proxy-anyauth and --proxy-basic. Added in 7.17.1.
2009
2010 --proxy-ntlm
2011 Tells curl to use HTTP NTLM authentication when communicating
2012 with the given proxy. Use --ntlm for enabling NTLM with a remote
2013 host.
2014
2015 See also --proxy-negotiate and --proxy-anyauth.
2016
2017 --proxy-pass <phrase>
2018 Same as --pass but used in HTTPS proxy context.
2019
2020 Added in 7.52.0.
2021
2022 --proxy-pinnedpubkey <hashes>
2023 (TLS) Tells curl to use the specified public key file (or
2024 hashes) to verify the proxy. This can be a path to a file which
2025 contains a single public key in PEM or DER format, or any number
2026 of base64 encoded sha256 hashes preceded by ´sha256//´ and sepa‐
2027 rated by ´;´
2028
2029 When negotiating a TLS or SSL connection, the server sends a
2030 certificate indicating its identity. A public key is extracted
2031 from this certificate and if it does not exactly match the pub‐
2032 lic key provided to this option, curl will abort the connection
2033 before sending or receiving any data.
2034
2035 If this option is used several times, the last one will be used.
2036
2037 --proxy-service-name <name>
2038 This option allows you to change the service name for proxy
2039 negotiation.
2040
2041 Added in 7.43.0.
2042
2043 --proxy-ssl-allow-beast
2044 Same as --ssl-allow-beast but used in HTTPS proxy context.
2045
2046 Added in 7.52.0.
2047
2048 --proxy-tls13-ciphers <ciphersuite list>
2049 (TLS) Specifies which cipher suites to use in the connection to
2050 your HTTPS proxy when it negotiates TLS 1.3. The list of ciphers
2051 suites must specify valid ciphers. Read up on TLS 1.3 cipher
2052 suite details on this URL:
2053
2054 https://curl.haxx.se/docs/ssl-ciphers.html
2055
2056 If this option is used several times, the last one will be used.
2057
2058 --proxy-tlsauthtype <type>
2059 Same as --tlsauthtype but used in HTTPS proxy context.
2060
2061 Added in 7.52.0.
2062
2063 --proxy-tlspassword <string>
2064 Same as --tlspassword but used in HTTPS proxy context.
2065
2066 Added in 7.52.0.
2067
2068 --proxy-tlsuser <name>
2069 Same as --tlsuser but used in HTTPS proxy context.
2070
2071 Added in 7.52.0.
2072
2073 --proxy-tlsv1
2074 Same as -1, --tlsv1 but used in HTTPS proxy context.
2075
2076 Added in 7.52.0.
2077
2078 -U, --proxy-user <user:password>
2079 Specify the user name and password to use for proxy authentica‐
2080 tion.
2081
2082 If you use a Windows SSPI-enabled curl binary and do either
2083 Negotiate or NTLM authentication then you can tell curl to
2084 select the user name and password from your environment by spec‐
2085 ifying a single colon with this option: "-U :".
2086
2087 If this option is used several times, the last one will be used.
2088
2089 -x, --proxy [protocol://]host[:port]
2090 Use the specified proxy.
2091
2092 The proxy string can be specified with a protocol:// prefix. No
2093 protocol specified or http:// will be treated as HTTP proxy. Use
2094 socks4://, socks4a://, socks5:// or socks5h:// to request a spe‐
2095 cific SOCKS version to be used. (The protocol support was added
2096 in curl 7.21.7)
2097
2098 HTTPS proxy support via https:// protocol prefix was added in
2099 7.52.0 for OpenSSL, GnuTLS and NSS.
2100
2101 Unrecognized and unsupported proxy protocols cause an error
2102 since 7.52.0. Prior versions may ignore the protocol and use
2103 http:// instead.
2104
2105 If the port number is not specified in the proxy string, it is
2106 assumed to be 1080.
2107
2108 This option overrides existing environment variables that set
2109 the proxy to use. If there's an environment variable setting a
2110 proxy, you can set proxy to "" to override it.
2111
2112 All operations that are performed over an HTTP proxy will trans‐
2113 parently be converted to HTTP. It means that certain protocol
2114 specific operations might not be available. This is not the case
2115 if you can tunnel through the proxy, as one with the -p, --prox‐
2116 ytunnel option.
2117
2118 User and password that might be provided in the proxy string are
2119 URL decoded by curl. This allows you to pass in special charac‐
2120 ters such as @ by using %40 or pass in a colon with %3a.
2121
2122 The proxy host can be specified the exact same way as the proxy
2123 environment variables, including the protocol prefix (http://)
2124 and the embedded user + password.
2125
2126 If this option is used several times, the last one will be used.
2127
2128 --proxy1.0 <host[:port]>
2129 Use the specified HTTP 1.0 proxy. If the port number is not
2130 specified, it is assumed at port 1080.
2131
2132 The only difference between this and the HTTP proxy option -x,
2133 --proxy, is that attempts to use CONNECT through the proxy will
2134 specify an HTTP 1.0 protocol instead of the default HTTP 1.1.
2135
2136 -p, --proxytunnel
2137 When an HTTP proxy is used -x, --proxy, this option will cause
2138 non-HTTP protocols to attempt to tunnel through the proxy
2139 instead of merely using it to do HTTP-like operations. The tun‐
2140 nel approach is made with the HTTP proxy CONNECT request and
2141 requires that the proxy allows direct connect to the remote port
2142 number curl wants to tunnel through to.
2143
2144 To suppress proxy CONNECT response headers when curl is set to
2145 output headers use --suppress-connect-headers.
2146
2147 See also -x, --proxy.
2148
2149 --pubkey <key>
2150 (SFTP SCP) Public key file name. Allows you to provide your pub‐
2151 lic key in this separate file.
2152
2153 If this option is used several times, the last one will be used.
2154
2155 (As of 7.39.0, curl attempts to automatically extract the public
2156 key from the private key file, so passing this option is gener‐
2157 ally not required. Note that this public key extraction requires
2158 libcurl to be linked against a copy of libssh2 1.2.8 or higher
2159 that is itself linked against OpenSSL.)
2160
2161 -Q, --quote
2162 (FTP SFTP) Send an arbitrary command to the remote FTP or SFTP
2163 server. Quote commands are sent BEFORE the transfer takes place
2164 (just after the initial PWD command in an FTP transfer, to be
2165 exact). To make commands take place after a successful transfer,
2166 prefix them with a dash '-'. To make commands be sent after
2167 curl has changed the working directory, just before the transfer
2168 command(s), prefix the command with a '+' (this is only sup‐
2169 ported for FTP). You may specify any number of commands.
2170
2171 If the server returns failure for one of the commands, the
2172 entire operation will be aborted. You must send syntactically
2173 correct FTP commands as RFC 959 defines to FTP servers, or one
2174 of the commands listed below to SFTP servers.
2175
2176 This option can be used multiple times. When speaking to an FTP
2177 server, prefix the command with an asterisk (*) to make curl
2178 continue even if the command fails as by default curl will stop
2179 at first failure.
2180
2181 SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP
2182 quote commands itself before sending them to the server. File
2183 names may be quoted shell-style to embed spaces or special char‐
2184 acters. Following is the list of all supported SFTP quote com‐
2185 mands:
2186
2187 chgrp group file
2188 The chgrp command sets the group ID of the file named by
2189 the file operand to the group ID specified by the group
2190 operand. The group operand is a decimal integer group ID.
2191
2192 chmod mode file
2193 The chmod command modifies the file mode bits of the
2194 specified file. The mode operand is an octal integer mode
2195 number.
2196
2197 chown user file
2198 The chown command sets the owner of the file named by the
2199 file operand to the user ID specified by the user oper‐
2200 and. The user operand is a decimal integer user ID.
2201
2202 ln source_file target_file
2203 The ln and symlink commands create a symbolic link at the
2204 target_file location pointing to the source_file loca‐
2205 tion.
2206
2207 mkdir directory_name
2208 The mkdir command creates the directory named by the
2209 directory_name operand.
2210
2211 pwd The pwd command returns the absolute pathname of the cur‐
2212 rent working directory.
2213
2214 rename source target
2215 The rename command renames the file or directory named by
2216 the source operand to the destination path named by the
2217 target operand.
2218
2219 rm file
2220 The rm command removes the file specified by the file op‐
2221 erand.
2222
2223 rmdir directory
2224 The rmdir command removes the directory entry specified
2225 by the directory operand, provided it is empty.
2226
2227 symlink source_file target_file
2228 See ln.
2229
2230 --random-file <file>
2231 Specify the path name to file containing what will be considered
2232 as random data. The data may be used to seed the random engine
2233 for SSL connections. See also the --egd-file option.
2234
2235 -r, --range <range>
2236 (HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial docu‐
2237 ment) from an HTTP/1.1, FTP or SFTP server or a local FILE.
2238 Ranges can be specified in a number of ways.
2239
2240 0-499 specifies the first 500 bytes
2241
2242 500-999 specifies the second 500 bytes
2243
2244 -500 specifies the last 500 bytes
2245
2246 9500- specifies the bytes from offset 9500 and forward
2247
2248 0-0,-1 specifies the first and last byte only(*)(HTTP)
2249
2250 100-199,500-599
2251 specifies two separate 100-byte ranges(*) (HTTP)
2252
2253 (*) = NOTE that this will cause the server to reply with a mul‐
2254 tipart response!
2255
2256 Only digit characters (0-9) are valid in the 'start' and 'stop'
2257 fields of the 'start-stop' range syntax. If a non-digit charac‐
2258 ter is given in the range, the server's response will be unspec‐
2259 ified, depending on the server's configuration.
2260
2261 You should also be aware that many HTTP/1.1 servers do not have
2262 this feature enabled, so that when you attempt to get a range,
2263 you'll instead get the whole document.
2264
2265 FTP and SFTP range downloads only support the simple 'start-
2266 stop' syntax (optionally with one of the numbers omitted). FTP
2267 use depends on the extended FTP command SIZE.
2268
2269 If this option is used several times, the last one will be used.
2270
2271 --raw (HTTP) When used, it disables all internal HTTP decoding of con‐
2272 tent or transfer encodings and instead makes them passed on
2273 unaltered, raw.
2274
2275 Added in 7.16.2.
2276
2277 -e, --referer <URL>
2278 (HTTP) Sends the "Referrer Page" information to the HTTP server.
2279 This can also be set with the -H, --header flag of course. When
2280 used with -L, --location you can append ";auto" to the -e,
2281 --referer URL to make curl automatically set the previous URL
2282 when it follows a Location: header. The ";auto" string can be
2283 used alone, even if you don't set an initial -e, --referer.
2284
2285 If this option is used several times, the last one will be used.
2286
2287 See also -A, --user-agent and -H, --header.
2288
2289 -J, --remote-header-name
2290 (HTTP) This option tells the -O, --remote-name option to use the
2291 server-specified Content-Disposition filename instead of
2292 extracting a filename from the URL.
2293
2294 If the server specifies a file name and a file with that name
2295 already exists in the current working directory it will not be
2296 overwritten and an error will occur. If the server doesn't spec‐
2297 ify a file name then this option has no effect.
2298
2299 There's no attempt to decode %-sequences (yet) in the provided
2300 file name, so this option may provide you with rather unexpected
2301 file names.
2302
2303 WARNING: Exercise judicious use of this option, especially on
2304 Windows. A rogue server could send you the name of a DLL or
2305 other file that could possibly be loaded automatically by Win‐
2306 dows or some third party software.
2307
2308 --remote-name-all
2309 This option changes the default action for all given URLs to be
2310 dealt with as if -O, --remote-name were used for each one. So if
2311 you want to disable that for a specific URL after --remote-name-
2312 all has been used, you must use "-o -" or --no-remote-name.
2313
2314 Added in 7.19.0.
2315
2316 -O, --remote-name
2317 Write output to a local file named like the remote file we get.
2318 (Only the file part of the remote file is used, the path is cut
2319 off.)
2320
2321 The file will be saved in the current working directory. If you
2322 want the file saved in a different directory, make sure you
2323 change the current working directory before invoking curl with
2324 this option.
2325
2326 The remote file name to use for saving is extracted from the
2327 given URL, nothing else, and if it already exists it will be
2328 overwritten. If you want the server to be able to choose the
2329 file name refer to -J, --remote-header-name which can be used in
2330 addition to this option. If the server chooses a file name and
2331 that name already exists it will not be overwritten.
2332
2333 There is no URL decoding done on the file name. If it has %20 or
2334 other URL encoded parts of the name, they will end up as-is as
2335 file name.
2336
2337 You may use this option as many times as the number of URLs you
2338 have.
2339
2340 -R, --remote-time
2341 When used, this will make curl attempt to figure out the time‐
2342 stamp of the remote file, and if that is available make the
2343 local file get that same timestamp.
2344
2345 --request-target
2346 (HTTP) Tells curl to use an alternative "target" (path) instead
2347 of using the path as provided in the URL. Particularly useful
2348 when wanting to issue HTTP requests without leading slash or
2349 other data that doesn't follow the regular URL pattern, like
2350 "OPTIONS *".
2351
2352 Added in 7.55.0.
2353
2354 -X, --request <command>
2355 (HTTP) Specifies a custom request method to use when communicat‐
2356 ing with the HTTP server. The specified request method will be
2357 used instead of the method otherwise used (which defaults to
2358 GET). Read the HTTP 1.1 specification for details and explana‐
2359 tions. Common additional HTTP requests include PUT and DELETE,
2360 but related technologies like WebDAV offers PROPFIND, COPY, MOVE
2361 and more.
2362
2363 Normally you don't need this option. All sorts of GET, HEAD,
2364 POST and PUT requests are rather invoked by using dedicated com‐
2365 mand line options.
2366
2367 This option only changes the actual word used in the HTTP
2368 request, it does not alter the way curl behaves. So for example
2369 if you want to make a proper HEAD request, using -X HEAD will
2370 not suffice. You need to use the -I, --head option.
2371
2372 The method string you set with -X, --request will be used for
2373 all requests, which if you for example use -L, --location may
2374 cause unintended side-effects when curl doesn't change request
2375 method according to the HTTP 30x response codes - and similar.
2376
2377 (FTP) Specifies a custom FTP command to use instead of LIST when
2378 doing file lists with FTP.
2379
2380 (POP3) Specifies a custom POP3 command to use instead of LIST or
2381 RETR. (Added in 7.26.0)
2382
2383 (IMAP) Specifies a custom IMAP command to use instead of LIST.
2384 (Added in 7.30.0)
2385
2386 (SMTP) Specifies a custom SMTP command to use instead of HELP or
2387 VRFY. (Added in 7.34.0)
2388
2389 If this option is used several times, the last one will be used.
2390
2391 --resolve <host:port:address[,address]...>
2392 Provide a custom address for a specific host and port pair.
2393 Using this, you can make the curl requests(s) use a specified
2394 address and prevent the otherwise normally resolved address to
2395 be used. Consider it a sort of /etc/hosts alternative provided
2396 on the command line. The port number should be the number used
2397 for the specific protocol the host will be used for. It means
2398 you need several entries if you want to provide address for the
2399 same host but different ports.
2400
2401 The provided address set by this option will be used even if -4,
2402 --ipv4 or -6, --ipv6 is set to make curl use another IP version.
2403
2404 Support for providing the IP address within [brackets] was added
2405 in 7.57.0.
2406
2407 Support for providing multiple IP addresses per entry was added
2408 in 7.59.0.
2409
2410 This option can be used many times to add many host names to
2411 resolve.
2412
2413 Added in 7.21.3.
2414
2415 --retry-connrefused
2416 In addition to the other conditions, consider ECONNREFUSED as a
2417 transient error too for --retry. This option is used together
2418 with --retry.
2419
2420 Added in 7.52.0.
2421
2422 --retry-delay <seconds>
2423 Make curl sleep this amount of time before each retry when a
2424 transfer has failed with a transient error (it changes the
2425 default backoff time algorithm between retries). This option is
2426 only interesting if --retry is also used. Setting this delay to
2427 zero will make curl use the default backoff time.
2428
2429 If this option is used several times, the last one will be used.
2430
2431 Added in 7.12.3.
2432
2433 --retry-max-time <seconds>
2434 The retry timer is reset before the first transfer attempt.
2435 Retries will be done as usual (see --retry) as long as the timer
2436 hasn't reached this given limit. Notice that if the timer hasn't
2437 reached the limit, the request will be made and while perform‐
2438 ing, it may take longer than this given time period. To limit a
2439 single request´s maximum time, use -m, --max-time. Set this
2440 option to zero to not timeout retries.
2441
2442 If this option is used several times, the last one will be used.
2443
2444 Added in 7.12.3.
2445
2446 --retry <num>
2447 If a transient error is returned when curl tries to perform a
2448 transfer, it will retry this number of times before giving up.
2449 Setting the number to 0 makes curl do no retries (which is the
2450 default). Transient error means either: a timeout, an FTP 4xx
2451 response code or an HTTP 408 or 5xx response code.
2452
2453 When curl is about to retry a transfer, it will first wait one
2454 second and then for all forthcoming retries it will double the
2455 waiting time until it reaches 10 minutes which then will be the
2456 delay between the rest of the retries. By using --retry-delay
2457 you disable this exponential backoff algorithm. See also
2458 --retry-max-time to limit the total time allowed for retries.
2459
2460 If this option is used several times, the last one will be used.
2461
2462 Added in 7.12.3.
2463
2464 --sasl-ir
2465 Enable initial response in SASL authentication.
2466
2467 Added in 7.31.0.
2468
2469 --service-name <name>
2470 This option allows you to change the service name for SPNEGO.
2471
2472 Examples: --negotiate --service-name sockd would use
2473 sockd/server-name.
2474
2475 Added in 7.43.0.
2476
2477 -S, --show-error
2478 When used with -s, --silent, it makes curl show an error message
2479 if it fails.
2480
2481 -s, --silent
2482 Silent or quiet mode. Don't show progress meter or error mes‐
2483 sages. Makes Curl mute. It will still output the data you ask
2484 for, potentially even to the terminal/stdout unless you redirect
2485 it.
2486
2487 Use -S, --show-error in addition to this option to disable
2488 progress meter but still show error messages.
2489
2490 See also -v, --verbose and --stderr.
2491
2492 --socks4 <host[:port]>
2493 Use the specified SOCKS4 proxy. If the port number is not speci‐
2494 fied, it is assumed at port 1080.
2495
2496 This option overrides any previous use of -x, --proxy, as they
2497 are mutually exclusive.
2498
2499 Since 7.21.7, this option is superfluous since you can specify a
2500 socks4 proxy with -x, --proxy using a socks4:// protocol prefix.
2501
2502 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at
2503 the same time -x, --proxy is used with an HTTP/HTTPS proxy. In
2504 such a case curl first connects to the SOCKS proxy and then con‐
2505 nects (through SOCKS) to the HTTP or HTTPS proxy.
2506
2507 If this option is used several times, the last one will be used.
2508
2509 Added in 7.15.2.
2510
2511 --socks4a <host[:port]>
2512 Use the specified SOCKS4a proxy. If the port number is not spec‐
2513 ified, it is assumed at port 1080.
2514
2515 This option overrides any previous use of -x, --proxy, as they
2516 are mutually exclusive.
2517
2518 Since 7.21.7, this option is superfluous since you can specify a
2519 socks4a proxy with -x, --proxy using a socks4a:// protocol pre‐
2520 fix.
2521
2522 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at
2523 the same time -x, --proxy is used with an HTTP/HTTPS proxy. In
2524 such a case curl first connects to the SOCKS proxy and then con‐
2525 nects (through SOCKS) to the HTTP or HTTPS proxy.
2526
2527 If this option is used several times, the last one will be used.
2528
2529 Added in 7.18.0.
2530
2531 --socks5-basic
2532 Tells curl to use username/password authentication when connect‐
2533 ing to a SOCKS5 proxy. The username/password authentication is
2534 enabled by default. Use --socks5-gssapi to force GSS-API
2535 authentication to SOCKS5 proxies.
2536
2537 Added in 7.55.0.
2538
2539 --socks5-gssapi-nec
2540 As part of the GSS-API negotiation a protection mode is negoti‐
2541 ated. RFC 1961 says in section 4.3/4.4 it should be protected,
2542 but the NEC reference implementation does not. The option
2543 --socks5-gssapi-nec allows the unprotected exchange of the pro‐
2544 tection mode negotiation.
2545
2546 Added in 7.19.4.
2547
2548 --socks5-gssapi-service <name>
2549 The default service name for a socks server is rcmd/server-fqdn.
2550 This option allows you to change it.
2551
2552 Examples: --socks5 proxy-name --socks5-gssapi-service sockd
2553 would use sockd/proxy-name --socks5 proxy-name --socks5-gssapi-
2554 service sockd/real-name would use sockd/real-name for cases
2555 where the proxy-name does not match the principal name.
2556
2557 Added in 7.19.4.
2558
2559 --socks5-gssapi
2560 Tells curl to use GSS-API authentication when connecting to a
2561 SOCKS5 proxy. The GSS-API authentication is enabled by default
2562 (if curl is compiled with GSS-API support). Use --socks5-basic
2563 to force username/password authentication to SOCKS5 proxies.
2564
2565 Added in 7.55.0.
2566
2567 --socks5-hostname <host[:port]>
2568 Use the specified SOCKS5 proxy (and let the proxy resolve the
2569 host name). If the port number is not specified, it is assumed
2570 at port 1080.
2571
2572 This option overrides any previous use of -x, --proxy, as they
2573 are mutually exclusive.
2574
2575 Since 7.21.7, this option is superfluous since you can specify a
2576 socks5 hostname proxy with -x, --proxy using a socks5h:// proto‐
2577 col prefix.
2578
2579 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at
2580 the same time -x, --proxy is used with an HTTP/HTTPS proxy. In
2581 such a case curl first connects to the SOCKS proxy and then con‐
2582 nects (through SOCKS) to the HTTP or HTTPS proxy.
2583
2584 If this option is used several times, the last one will be used.
2585
2586 Added in 7.18.0.
2587
2588 --socks5 <host[:port]>
2589 Use the specified SOCKS5 proxy - but resolve the host name
2590 locally. If the port number is not specified, it is assumed at
2591 port 1080.
2592
2593 This option overrides any previous use of -x, --proxy, as they
2594 are mutually exclusive.
2595
2596 Since 7.21.7, this option is superfluous since you can specify a
2597 socks5 proxy with -x, --proxy using a socks5:// protocol prefix.
2598
2599 Since 7.52.0, --preproxy can be used to specify a SOCKS proxy at
2600 the same time -x, --proxy is used with an HTTP/HTTPS proxy. In
2601 such a case curl first connects to the SOCKS proxy and then con‐
2602 nects (through SOCKS) to the HTTP or HTTPS proxy.
2603
2604 If this option is used several times, the last one will be used.
2605
2606 This option (as well as --socks4) does not work with IPV6, FTPS
2607 or LDAP.
2608
2609 Added in 7.18.0.
2610
2611 -Y, --speed-limit <speed>
2612 If a download is slower than this given speed (in bytes per sec‐
2613 ond) for speed-time seconds it gets aborted. speed-time is set
2614 with -y, --speed-time and is 30 if not set.
2615
2616 If this option is used several times, the last one will be used.
2617
2618 -y, --speed-time <seconds>
2619 If a download is slower than speed-limit bytes per second during
2620 a speed-time period, the download gets aborted. If speed-time is
2621 used, the default speed-limit will be 1 unless set with -Y,
2622 --speed-limit.
2623
2624 This option controls transfers and thus will not affect slow
2625 connects etc. If this is a concern for you, try the --connect-
2626 timeout option.
2627
2628 If this option is used several times, the last one will be used.
2629
2630 --ssl-allow-beast
2631 This option tells curl to not work around a security flaw in the
2632 SSL3 and TLS1.0 protocols known as BEAST. If this option isn't
2633 used, the SSL layer may use workarounds known to cause interop‐
2634 erability problems with some older SSL implementations. WARNING:
2635 this option loosens the SSL security, and by using this flag you
2636 ask for exactly that.
2637
2638 Added in 7.25.0.
2639
2640 --ssl-no-revoke
2641 (WinSSL) This option tells curl to disable certificate revoca‐
2642 tion checks. WARNING: this option loosens the SSL security, and
2643 by using this flag you ask for exactly that.
2644
2645 Added in 7.44.0.
2646
2647 --ssl-reqd
2648 (FTP IMAP POP3 SMTP) Require SSL/TLS for the connection. Termi‐
2649 nates the connection if the server doesn't support SSL/TLS.
2650
2651 This option was formerly known as --ftp-ssl-reqd.
2652
2653 Added in 7.20.0.
2654
2655 --ssl (FTP IMAP POP3 SMTP) Try to use SSL/TLS for the connection.
2656 Reverts to a non-secure connection if the server doesn't support
2657 SSL/TLS. See also --ftp-ssl-control and --ssl-reqd for differ‐
2658 ent levels of encryption required.
2659
2660 This option was formerly known as --ftp-ssl (Added in 7.11.0).
2661 That option name can still be used but will be removed in a
2662 future version.
2663
2664 Added in 7.20.0.
2665
2666 -2, --sslv2
2667 (SSL) Forces curl to use SSL version 2 when negotiating with a
2668 remote SSL server. Sometimes curl is built without SSLv2 sup‐
2669 port. SSLv2 is widely considered insecure (see RFC 6176).
2670
2671 See also --http1.1 and --http2. -2, --sslv2 requires that the
2672 underlying libcurl was built to support TLS. This option over‐
2673 rides -3, --sslv3 and -1, --tlsv1 and --tlsv1.1 and --tlsv1.2.
2674
2675 -3, --sslv3
2676 (SSL) Forces curl to use SSL version 3 when negotiating with a
2677 remote SSL server. Sometimes curl is built without SSLv3 sup‐
2678 port. SSLv3 is widely considered insecure (see RFC 7568).
2679
2680 See also --http1.1 and --http2. -3, --sslv3 requires that the
2681 underlying libcurl was built to support TLS. This option over‐
2682 rides -2, --sslv2 and -1, --tlsv1 and --tlsv1.1 and --tlsv1.2.
2683
2684 --stderr
2685 Redirect all writes to stderr to the specified file instead. If
2686 the file name is a plain '-', it is instead written to stdout.
2687
2688 If this option is used several times, the last one will be used.
2689
2690 See also -v, --verbose and -s, --silent.
2691
2692 --styled-output
2693 Enables the automatic use of bold font styles when writing HTTP
2694 headers to the terminal. Use --no-styled-output to switch them
2695 off.
2696
2697 Added in 7.61.0.
2698
2699 --suppress-connect-headers
2700 When -p, --proxytunnel is used and a CONNECT request is made
2701 don't output proxy CONNECT response headers. This option is
2702 meant to be used with -D, --dump-header or -i, --include which
2703 are used to show protocol headers in the output. It has no
2704 effect on debug options such as -v, --verbose or --trace, or any
2705 statistics.
2706
2707 See also -D, --dump-header and -i, --include and -p, --proxytun‐
2708 nel.
2709
2710 --tcp-fastopen
2711 Enable use of TCP Fast Open (RFC7413).
2712
2713 Added in 7.49.0.
2714
2715 --tcp-nodelay
2716 Turn on the TCP_NODELAY option. See the curl_easy_setopt(3) man
2717 page for details about this option.
2718
2719 Since 7.50.2, curl sets this option by default and you need to
2720 explicitly switch it off if you don't want it on.
2721
2722 Added in 7.11.2.
2723
2724 -t, --telnet-option <opt=val>
2725 Pass options to the telnet protocol. Supported options are:
2726
2727 TTYPE=<term> Sets the terminal type.
2728
2729 XDISPLOC=<X display> Sets the X display location.
2730
2731 NEW_ENV=<var,val> Sets an environment variable.
2732
2733 --tftp-blksize <value>
2734 (TFTP) Set TFTP BLKSIZE option (must be >512). This is the block
2735 size that curl will try to use when transferring data to or from
2736 a TFTP server. By default 512 bytes will be used.
2737
2738 If this option is used several times, the last one will be used.
2739
2740 Added in 7.20.0.
2741
2742 --tftp-no-options
2743 (TFTP) Tells curl not to send TFTP options requests.
2744
2745 This option improves interop with some legacy servers that do
2746 not acknowledge or properly implement TFTP options. When this
2747 option is used --tftp-blksize is ignored.
2748
2749 Added in 7.48.0.
2750
2751 -z, --time-cond <time>
2752 (HTTP FTP) Request a file that has been modified later than the
2753 given time and date, or one that has been modified before that
2754 time. The <date expression> can be all sorts of date strings or
2755 if it doesn't match any internal ones, it is taken as a filename
2756 and tries to get the modification date (mtime) from <file>
2757 instead. See the curl_getdate(3) man pages for date expression
2758 details.
2759
2760 Start the date expression with a dash (-) to make it request for
2761 a document that is older than the given date/time, default is a
2762 document that is newer than the specified date/time.
2763
2764 If this option is used several times, the last one will be used.
2765
2766 --tls-max <VERSION>
2767 (SSL) VERSION defines maximum supported TLS version. A minimum
2768 is defined by arguments tlsv1.0 or tlsv1.1 or tlsv1.2.
2769
2770
2771 default
2772 Use up to recommended TLS version.
2773
2774 1.0 Use up to TLSv1.0.
2775
2776 1.1 Use up to TLSv1.1.
2777
2778 1.2 Use up to TLSv1.2.
2779
2780 1.3 Use up to TLSv1.3.
2781
2782 See also --tlsv1.0 and --tlsv1.1 and --tlsv1.2. --tls-max requires that
2783 the underlying libcurl was built to support TLS. Added in 7.54.0.
2784
2785 --tls13-ciphers <list of TLS 1.3 ciphersuites>
2786 (TLS) Specifies which cipher suites to use in the connection if
2787 it negotiates TLS 1.3. The list of ciphers suites must specify
2788 valid ciphers. Read up on TLS 1.3 cipher suite details on this
2789 URL:
2790
2791 https://curl.haxx.se/docs/ssl-ciphers.html
2792
2793 If this option is used several times, the last one will be used.
2794
2795 --tlsauthtype <type>
2796 Set TLS authentication type. Currently, the only supported
2797 option is "SRP", for TLS-SRP (RFC 5054). If --tlsuser and
2798 --tlspassword are specified but --tlsauthtype is not, then this
2799 option defaults to "SRP". This option works only if the under‐
2800 lying libcurl is built with TLS-SRP support, which requires
2801 OpenSSL or GnuTLS with TLS-SRP support.
2802
2803 Added in 7.21.4.
2804
2805 --tlspassword
2806 Set password for use with the TLS authentication method speci‐
2807 fied with --tlsauthtype. Requires that --tlsuser also be set.
2808
2809 Added in 7.21.4.
2810
2811 --tlsuser <name>
2812 Set username for use with the TLS authentication method speci‐
2813 fied with --tlsauthtype. Requires that --tlspassword also is
2814 set.
2815
2816 Added in 7.21.4.
2817
2818 --tlsv1.0
2819 (TLS) Forces curl to use TLS version 1.0 or later when connect‐
2820 ing to a remote TLS server.
2821
2822 Added in 7.34.0.
2823
2824 --tlsv1.1
2825 (TLS) Forces curl to use TLS version 1.1 or later when connect‐
2826 ing to a remote TLS server.
2827
2828 Added in 7.34.0.
2829
2830 --tlsv1.2
2831 (TLS) Forces curl to use TLS version 1.2 or later when connect‐
2832 ing to a remote TLS server.
2833
2834 Added in 7.34.0.
2835
2836 --tlsv1.3
2837 (TLS) Forces curl to use TLS version 1.3 or later when connect‐
2838 ing to a remote TLS server.
2839
2840 Note that TLS 1.3 is only supported by a subset of TLS backends.
2841 At the time of this writing, they are BoringSSL, NSS, and Secure
2842 Transport (on iOS 11 or later, and macOS 10.13 or later).
2843
2844 Added in 7.52.0.
2845
2846 -1, --tlsv1
2847 (SSL) Tells curl to use at least TLS version 1.x when negotiat‐
2848 ing with a remote TLS server. That means TLS version 1.0 or
2849 higher
2850
2851 See also --http1.1 and --http2. -1, --tlsv1 requires that the
2852 underlying libcurl was built to support TLS. This option over‐
2853 rides --tlsv1.1 and --tlsv1.2 and --tlsv1.3.
2854
2855 --tr-encoding
2856 (HTTP) Request a compressed Transfer-Encoding response using one
2857 of the algorithms curl supports, and uncompress the data while
2858 receiving it.
2859
2860 Added in 7.21.6.
2861
2862 --trace-ascii <file>
2863 Enables a full trace dump of all incoming and outgoing data,
2864 including descriptive information, to the given output file. Use
2865 "-" as filename to have the output sent to stdout.
2866
2867 This is very similar to --trace, but leaves out the hex part and
2868 only shows the ASCII part of the dump. It makes smaller output
2869 that might be easier to read for untrained humans.
2870
2871 If this option is used several times, the last one will be used.
2872
2873 This option overrides --trace and -v, --verbose.
2874
2875 --trace-time
2876 Prepends a time stamp to each trace or verbose line that curl
2877 displays.
2878
2879 Added in 7.14.0.
2880
2881 --trace <file>
2882 Enables a full trace dump of all incoming and outgoing data,
2883 including descriptive information, to the given output file. Use
2884 "-" as filename to have the output sent to stdout. Use "%" as
2885 filename to have the output sent to stderr.
2886
2887 If this option is used several times, the last one will be used.
2888
2889 This option overrides -v, --verbose and --trace-ascii.
2890
2891 --unix-socket <path>
2892 (HTTP) Connect through this Unix domain socket, instead of using
2893 the network.
2894
2895 Added in 7.40.0.
2896
2897 -T, --upload-file <file>
2898 This transfers the specified local file to the remote URL. If
2899 there is no file part in the specified URL, curl will append the
2900 local file name. NOTE that you must use a trailing / on the last
2901 directory to really prove to Curl that there is no file name or
2902 curl will think that your last directory name is the remote file
2903 name to use. That will most likely cause the upload operation to
2904 fail. If this is used on an HTTP(S) server, the PUT command will
2905 be used.
2906
2907 Use the file name "-" (a single dash) to use stdin instead of a
2908 given file. Alternately, the file name "." (a single period)
2909 may be specified instead of "-" to use stdin in non-blocking
2910 mode to allow reading server output while stdin is being
2911 uploaded.
2912
2913 You can specify one -T, --upload-file for each URL on the com‐
2914 mand line. Each -T, --upload-file + URL pair specifies what to
2915 upload and to where. curl also supports "globbing" of the -T,
2916 --upload-file argument, meaning that you can upload multiple
2917 files to a single URL by using the same URL globbing style sup‐
2918 ported in the URL, like this:
2919
2920 curl --upload-file "{file1,file2}" http://www.example.com
2921
2922 or even
2923
2924 curl -T "img[1-1000].png" ftp://ftp.example.com/upload/
2925
2926 When uploading to an SMTP server: the uploaded data is assumed
2927 to be RFC 5322 formatted. It has to feature the necessary set of
2928 headers and mail body formatted correctly by the user as curl
2929 will not transcode nor encode it further in any way.
2930
2931 --url <url>
2932 Specify a URL to fetch. This option is mostly handy when you
2933 want to specify URL(s) in a config file.
2934
2935 If the given URL is missing a scheme name (such as "http://" or
2936 "ftp://" etc) then curl will make a guess based on the host. If
2937 the outermost sub-domain name matches DICT, FTP, IMAP, LDAP,
2938 POP3 or SMTP then that protocol will be used, otherwise HTTP
2939 will be used. Since 7.45.0 guessing can be disabled by setting a
2940 default protocol, see --proto-default for details.
2941
2942 This option may be used any number of times. To control where
2943 this URL is written, use the -o, --output or the -O, --remote-
2944 name options.
2945
2946 -B, --use-ascii
2947 (FTP LDAP) Enable ASCII transfer. For FTP, this can also be
2948 enforced by using a URL that ends with ";type=A". This option
2949 causes data sent to stdout to be in text mode for win32 systems.
2950
2951 -A, --user-agent <name>
2952 (HTTP) Specify the User-Agent string to send to the HTTP server.
2953 To encode blanks in the string, surround the string with single
2954 quote marks. This header can also be set with the -H, --header
2955 or the --proxy-header options.
2956
2957 If this option is used several times, the last one will be used.
2958
2959 -u, --user <user:password>
2960 Specify the user name and password to use for server authentica‐
2961 tion. Overrides -n, --netrc and --netrc-optional.
2962
2963 If you simply specify the user name, curl will prompt for a
2964 password.
2965
2966 The user name and passwords are split up on the first colon,
2967 which makes it impossible to use a colon in the user name with
2968 this option. The password can, still.
2969
2970 When using Kerberos V5 with a Windows based server you should
2971 include the Windows domain name in the user name, in order for
2972 the server to successfully obtain a Kerberos Ticket. If you
2973 don't then the initial authentication handshake may fail.
2974
2975 When using NTLM, the user name can be specified simply as the
2976 user name, without the domain, if there is a single domain and
2977 forest in your setup for example.
2978
2979 To specify the domain name use either Down-Level Logon Name or
2980 UPN (User Principal Name) formats. For example, EXAMPLE\user and
2981 user@example.com respectively.
2982
2983 If you use a Windows SSPI-enabled curl binary and perform Ker‐
2984 beros V5, Negotiate, NTLM or Digest authentication then you can
2985 tell curl to select the user name and password from your envi‐
2986 ronment by specifying a single colon with this option: "-u :".
2987
2988 If this option is used several times, the last one will be used.
2989
2990 -v, --verbose
2991 Makes curl verbose during the operation. Useful for debugging
2992 and seeing what's going on "under the hood". A line starting
2993 with '>' means "header data" sent by curl, '<' means "header
2994 data" received by curl that is hidden in normal cases, and a
2995 line starting with '*' means additional info provided by curl.
2996
2997 If you only want HTTP headers in the output, -i, --include might
2998 be the option you're looking for.
2999
3000 If you think this option still doesn't give you enough details,
3001 consider using --trace or --trace-ascii instead.
3002
3003 Use -s, --silent to make curl really quiet.
3004
3005 See also -i, --include. This option overrides --trace and
3006 --trace-ascii.
3007
3008 -V, --version
3009 Displays information about curl and the libcurl version it uses.
3010
3011 The first line includes the full version of curl, libcurl and
3012 other 3rd party libraries linked with the executable.
3013
3014 The second line (starts with "Protocols:") shows all protocols
3015 that libcurl reports to support.
3016
3017 The third line (starts with "Features:") shows specific features
3018 libcurl reports to offer. Available features include:
3019
3020 IPv6 You can use IPv6 with this.
3021
3022 krb4 Krb4 for FTP is supported.
3023
3024 SSL SSL versions of various protocols are supported, such as
3025 HTTPS, FTPS, POP3S and so on.
3026
3027 libz Automatic decompression of compressed files over HTTP is
3028 supported.
3029
3030 NTLM NTLM authentication is supported.
3031
3032 Debug This curl uses a libcurl built with Debug. This enables
3033 more error-tracking and memory debugging etc. For curl-
3034 developers only!
3035
3036 AsynchDNS
3037 This curl uses asynchronous name resolves. Asynchronous
3038 name resolves can be done using either the c-ares or the
3039 threaded resolver backends.
3040
3041 SPNEGO SPNEGO authentication is supported.
3042
3043 Largefile
3044 This curl supports transfers of large files, files larger
3045 than 2GB.
3046
3047 IDN This curl supports IDN - international domain names.
3048
3049 GSS-API
3050 GSS-API is supported.
3051
3052 SSPI SSPI is supported.
3053
3054 TLS-SRP
3055 SRP (Secure Remote Password) authentication is supported
3056 for TLS.
3057
3058 HTTP2 HTTP/2 support has been built-in.
3059
3060 UnixSockets
3061 Unix sockets support is provided.
3062
3063 HTTPS-proxy
3064 This curl is built to support HTTPS proxy.
3065
3066 Metalink
3067 This curl supports Metalink (both version 3 and 4 (RFC
3068 5854)), which describes mirrors and hashes. curl will
3069 use mirrors for failover if there are errors (such as the
3070 file or server not being available).
3071
3072 PSL PSL is short for Public Suffix List and means that this
3073 curl has been built with knowledge about "public suf‐
3074 fixes".
3075
3076 -w, --write-out <format>
3077 Make curl display information on stdout after a completed trans‐
3078 fer. The format is a string that may contain plain text mixed
3079 with any number of variables. The format can be specified as a
3080 literal "string", or you can have curl read the format from a
3081 file with "@filename" and to tell curl to read the format from
3082 stdin you write "@-".
3083
3084 The variables present in the output format will be substituted
3085 by the value or text that curl thinks fit, as described below.
3086 All variables are specified as %{variable_name} and to output a
3087 normal % you just write them as %%. You can output a newline by
3088 using \n, a carriage return with \r and a tab space with \t.
3089
3090 NOTE: The %-symbol is a special symbol in the win32-environment,
3091 where all occurrences of % must be doubled when using this
3092 option.
3093
3094 The variables available are:
3095
3096 content_type The Content-Type of the requested document, if
3097 there was any.
3098
3099 filename_effective
3100 The ultimate filename that curl writes out to.
3101 This is only meaningful if curl is told to write
3102 to a file with the -O, --remote-name or -o,
3103 --output option. It's most useful in combination
3104 with the -J, --remote-header-name option. (Added
3105 in 7.26.0)
3106
3107 ftp_entry_path The initial path curl ended up in when logging on
3108 to the remote FTP server. (Added in 7.15.4)
3109
3110 http_code The numerical response code that was found in the
3111 last retrieved HTTP(S) or FTP(s) transfer. In
3112 7.18.2 the alias response_code was added to show
3113 the same info.
3114
3115 http_connect The numerical code that was found in the last
3116 response (from a proxy) to a curl CONNECT
3117 request. (Added in 7.12.4)
3118
3119 http_version The http version that was effectively used.
3120 (Added in 7.50.0)
3121
3122 local_ip The IP address of the local end of the most
3123 recently done connection - can be either IPv4 or
3124 IPv6 (Added in 7.29.0)
3125
3126 local_port The local port number of the most recently done
3127 connection (Added in 7.29.0)
3128
3129 num_connects Number of new connects made in the recent trans‐
3130 fer. (Added in 7.12.3)
3131
3132 num_redirects Number of redirects that were followed in the
3133 request. (Added in 7.12.3)
3134
3135 proxy_ssl_verify_result
3136 The result of the HTTPS proxy's SSL peer certifi‐
3137 cate verification that was requested. 0 means the
3138 verification was successful. (Added in 7.52.0)
3139
3140 redirect_url When an HTTP request was made without -L, --loca‐
3141 tion to follow redirects (or when --max-redir is
3142 met), this variable will show the actual URL a
3143 redirect would have gone to. (Added in 7.18.2)
3144
3145 remote_ip The remote IP address of the most recently done
3146 connection - can be either IPv4 or IPv6 (Added in
3147 7.29.0)
3148
3149 remote_port The remote port number of the most recently done
3150 connection (Added in 7.29.0)
3151
3152 scheme The URL scheme (sometimes called protocol) that
3153 was effectively used (Added in 7.52.0)
3154
3155 size_download The total amount of bytes that were downloaded.
3156
3157 size_header The total amount of bytes of the downloaded head‐
3158 ers.
3159
3160 size_request The total amount of bytes that were sent in the
3161 HTTP request.
3162
3163 size_upload The total amount of bytes that were uploaded.
3164
3165 speed_download The average download speed that curl measured for
3166 the complete download. Bytes per second.
3167
3168 speed_upload The average upload speed that curl measured for
3169 the complete upload. Bytes per second.
3170
3171 ssl_verify_result
3172 The result of the SSL peer certificate verifica‐
3173 tion that was requested. 0 means the verification
3174 was successful. (Added in 7.19.0)
3175
3176 time_appconnect
3177 The time, in seconds, it took from the start
3178 until the SSL/SSH/etc connect/handshake to the
3179 remote host was completed. (Added in 7.19.0)
3180
3181 time_connect The time, in seconds, it took from the start
3182 until the TCP connect to the remote host (or
3183 proxy) was completed.
3184
3185 time_namelookup
3186 The time, in seconds, it took from the start
3187 until the name resolving was completed.
3188
3189 time_pretransfer
3190 The time, in seconds, it took from the start
3191 until the file transfer was just about to begin.
3192 This includes all pre-transfer commands and nego‐
3193 tiations that are specific to the particular pro‐
3194 tocol(s) involved.
3195
3196 time_redirect The time, in seconds, it took for all redirection
3197 steps including name lookup, connect, pretransfer
3198 and transfer before the final transaction was
3199 started. time_redirect shows the complete execu‐
3200 tion time for multiple redirections. (Added in
3201 7.12.3)
3202
3203 time_starttransfer
3204 The time, in seconds, it took from the start
3205 until the first byte was just about to be trans‐
3206 ferred. This includes time_pretransfer and also
3207 the time the server needed to calculate the
3208 result.
3209
3210 time_total The total time, in seconds, that the full opera‐
3211 tion lasted.
3212
3213 url_effective The URL that was fetched last. This is most mean‐
3214 ingful if you've told curl to follow location:
3215 headers.
3216
3217 If this option is used several times, the last one will be used.
3218
3219 --xattr
3220 When saving output to a file, this option tells curl to store
3221 certain file metadata in extended file attributes. Currently,
3222 the URL is stored in the xdg.origin.url attribute and, for HTTP,
3223 the content type is stored in the mime_type attribute. If the
3224 file system does not support extended attributes, a warning is
3225 issued.
3226
3228 ~/.curlrc
3229 Default config file, see -K, --config for details.
3230
3232 The environment variables can be specified in lower case or upper case.
3233 The lower case version has precedence. http_proxy is an exception as it
3234 is only available in lower case.
3235
3236 Using an environment variable to set the proxy has the same effect as
3237 using the -x, --proxy option.
3238
3239
3240 http_proxy [protocol://]<host>[:port]
3241 Sets the proxy server to use for HTTP.
3242
3243 HTTPS_PROXY [protocol://]<host>[:port]
3244 Sets the proxy server to use for HTTPS.
3245
3246 [url-protocol]_PROXY [protocol://]<host>[:port]
3247 Sets the proxy server to use for [url-protocol], where the pro‐
3248 tocol is a protocol that curl supports and as specified in a
3249 URL. FTP, FTPS, POP3, IMAP, SMTP, LDAP etc.
3250
3251 ALL_PROXY [protocol://]<host>[:port]
3252 Sets the proxy server to use if no protocol-specific proxy is
3253 set.
3254
3255 NO_PROXY <comma-separated list of hosts/domains>
3256 list of host names that shouldn't go through any proxy. If set
3257 to an asterisk '*' only, it matches all hosts. Each name in this
3258 list is matched as either a domain name which contains the host‐
3259 name, or the hostname itself.
3260
3261 This environment variable disables use of the proxy even when
3262 specified with the -x, --proxy option. That is
3263 NO_PROXY=direct.example.com curl -x http://proxy.example.com
3264 http://direct.example.com accesses the target URL directly, and
3265 NO_PROXY=direct.example.com curl -x http://proxy.example.com
3266 http://somewhere.example.com accesses the target URL through the
3267 proxy.
3268
3269 The list of host names can also be include numerical IP
3270 addresses, and IPv6 versions should then be given without
3271 enclosing brackets.
3272
3273
3275 Since curl version 7.21.7, the proxy string may be specified with a
3276 protocol:// prefix to specify alternative proxy protocols.
3277
3278 If no protocol is specified in the proxy string or if the string
3279 doesn't match a supported one, the proxy will be treated as an HTTP
3280 proxy.
3281
3282 The supported proxy protocol prefixes are as follows:
3283
3284 http://
3285 Makes it use it as an HTTP proxy. The default if no scheme pre‐
3286 fix is used.
3287
3288 https://
3289 Makes it treated as an HTTPS proxy.
3290
3291 socks4://
3292 Makes it the equivalent of --socks4
3293
3294 socks4a://
3295 Makes it the equivalent of --socks4a
3296
3297 socks5://
3298 Makes it the equivalent of --socks5
3299
3300 socks5h://
3301 Makes it the equivalent of --socks5-hostname
3302
3304 There are a bunch of different error codes and their corresponding
3305 error messages that may appear during bad conditions. At the time of
3306 this writing, the exit codes are:
3307
3308 1 Unsupported protocol. This build of curl has no support for this
3309 protocol.
3310
3311 2 Failed to initialize.
3312
3313 3 URL malformed. The syntax was not correct.
3314
3315 4 A feature or option that was needed to perform the desired
3316 request was not enabled or was explicitly disabled at build-
3317 time. To make curl able to do this, you probably need another
3318 build of libcurl!
3319
3320 5 Couldn't resolve proxy. The given proxy host could not be
3321 resolved.
3322
3323 6 Couldn't resolve host. The given remote host was not resolved.
3324
3325 7 Failed to connect to host.
3326
3327 8 Weird server reply. The server sent data curl couldn't parse.
3328
3329 9 FTP access denied. The server denied login or denied access to
3330 the particular resource or directory you wanted to reach. Most
3331 often you tried to change to a directory that doesn't exist on
3332 the server.
3333
3334 10 FTP accept failed. While waiting for the server to connect back
3335 when an active FTP session is used, an error code was sent over
3336 the control connection or similar.
3337
3338 11 FTP weird PASS reply. Curl couldn't parse the reply sent to the
3339 PASS request.
3340
3341 12 During an active FTP session while waiting for the server to
3342 connect back to curl, the timeout expired.
3343
3344 13 FTP weird PASV reply, Curl couldn't parse the reply sent to the
3345 PASV request.
3346
3347 14 FTP weird 227 format. Curl couldn't parse the 227-line the
3348 server sent.
3349
3350 15 FTP can't get host. Couldn't resolve the host IP we got in the
3351 227-line.
3352
3353 16 HTTP/2 error. A problem was detected in the HTTP2 framing layer.
3354 This is somewhat generic and can be one out of several problems,
3355 see the error message for details.
3356
3357 17 FTP couldn't set binary. Couldn't change transfer method to
3358 binary.
3359
3360 18 Partial file. Only a part of the file was transferred.
3361
3362 19 FTP couldn't download/access the given file, the RETR (or simi‐
3363 lar) command failed.
3364
3365 21 FTP quote error. A quote command returned error from the server.
3366
3367 22 HTTP page not retrieved. The requested url was not found or
3368 returned another error with the HTTP error code being 400 or
3369 above. This return code only appears if -f, --fail is used.
3370
3371 23 Write error. Curl couldn't write data to a local filesystem or
3372 similar.
3373
3374 25 FTP couldn't STOR file. The server denied the STOR operation,
3375 used for FTP uploading.
3376
3377 26 Read error. Various reading problems.
3378
3379 27 Out of memory. A memory allocation request failed.
3380
3381 28 Operation timeout. The specified time-out period was reached
3382 according to the conditions.
3383
3384 30 FTP PORT failed. The PORT command failed. Not all FTP servers
3385 support the PORT command, try doing a transfer using PASV
3386 instead!
3387
3388 31 FTP couldn't use REST. The REST command failed. This command is
3389 used for resumed FTP transfers.
3390
3391 33 HTTP range error. The range "command" didn't work.
3392
3393 34 HTTP post error. Internal post-request generation error.
3394
3395 35 SSL connect error. The SSL handshaking failed.
3396
3397 36 Bad download resume. Couldn't continue an earlier aborted down‐
3398 load.
3399
3400 37 FILE couldn't read file. Failed to open the file. Permissions?
3401
3402 38 LDAP cannot bind. LDAP bind operation failed.
3403
3404 39 LDAP search failed.
3405
3406 41 Function not found. A required LDAP function was not found.
3407
3408 42 Aborted by callback. An application told curl to abort the oper‐
3409 ation.
3410
3411 43 Internal error. A function was called with a bad parameter.
3412
3413 45 Interface error. A specified outgoing interface could not be
3414 used.
3415
3416 47 Too many redirects. When following redirects, curl hit the maxi‐
3417 mum amount.
3418
3419 48 Unknown option specified to libcurl. This indicates that you
3420 passed a weird option to curl that was passed on to libcurl and
3421 rejected. Read up in the manual!
3422
3423 49 Malformed telnet option.
3424
3425 51 The peer's SSL certificate or SSH MD5 fingerprint was not OK.
3426
3427 52 The server didn't reply anything, which here is considered an
3428 error.
3429
3430 53 SSL crypto engine not found.
3431
3432 54 Cannot set SSL crypto engine as default.
3433
3434 55 Failed sending network data.
3435
3436 56 Failure in receiving network data.
3437
3438 58 Problem with the local certificate.
3439
3440 59 Couldn't use specified SSL cipher.
3441
3442 60 Peer certificate cannot be authenticated with known CA certifi‐
3443 cates.
3444
3445 61 Unrecognized transfer encoding.
3446
3447 62 Invalid LDAP URL.
3448
3449 63 Maximum file size exceeded.
3450
3451 64 Requested FTP SSL level failed.
3452
3453 65 Sending the data requires a rewind that failed.
3454
3455 66 Failed to initialise SSL Engine.
3456
3457 67 The user name, password, or similar was not accepted and curl
3458 failed to log in.
3459
3460 68 File not found on TFTP server.
3461
3462 69 Permission problem on TFTP server.
3463
3464 70 Out of disk space on TFTP server.
3465
3466 71 Illegal TFTP operation.
3467
3468 72 Unknown TFTP transfer ID.
3469
3470 73 File already exists (TFTP).
3471
3472 74 No such user (TFTP).
3473
3474 75 Character conversion failed.
3475
3476 76 Character conversion functions required.
3477
3478 77 Problem with reading the SSL CA cert (path? access rights?).
3479
3480 78 The resource referenced in the URL does not exist.
3481
3482 79 An unspecified error occurred during the SSH session.
3483
3484 80 Failed to shut down the SSL connection.
3485
3486 82 Could not load CRL file, missing or wrong format (added in
3487 7.19.0).
3488
3489 83 Issuer check failed (added in 7.19.0).
3490
3491 84 The FTP PRET command failed
3492
3493 85 RTSP: mismatch of CSeq numbers
3494
3495 86 RTSP: mismatch of Session Identifiers
3496
3497 87 unable to parse FTP file list
3498
3499 88 FTP chunk callback reported error
3500
3501 89 No connection available, the session will be queued
3502
3503 90 SSL public key does not matched pinned public key
3504
3505 91 Invalid SSL certificate status.
3506
3507 92 Stream error in HTTP/2 framing layer.
3508
3509 XX More error codes will appear here in future releases. The exist‐
3510 ing ones are meant to never change.
3511
3513 Daniel Stenberg is the main author, but the whole list of contributors
3514 is found in the separate THANKS file.
3515
3517 https://curl.haxx.se
3518
3520 ftp(1), wget(1)
3521
3522
3523
3524Curl 7.52.0 16 Dec 2016 curl(1)