-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.1.html
5775 lines (5774 loc) · 320 KB
/
curl.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
**************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* SPDX-License-Identifier: curl
*
**************************************************************************
DO NOT EDIT. Generated by the curl project managen manpage generator.
-->
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>curl(1)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">curl(1)</td>
<td class="head-vol">curl Manual</td>
<td class="head-rtitle">curl(1)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp">curl - transfer a URL</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><b>curl [options / URLs]</b></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp"><b>curl</b> is a tool for transferring data from or to a server
using URLs. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER,
GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP,
RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and
WSS.</p>
<p class="Pp">curl is powered by libcurl for all transfer-related features. See
<i>libcurl(3)</i> for details.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="URL"><a class="permalink" href="#URL">URL</a></h1>
<p class="Pp">The URL syntax is protocol-dependent. You find a detailed
description in RFC 3986.</p>
<p class="Pp">If you provide a URL without a leading <b>protocol://</b> scheme,
curl guesses what protocol you want. It then defaults to HTTP but assumes
others based on often-used hostname prefixes. For example, for hostnames
starting with "ftp." curl assumes you want FTP.</p>
<p class="Pp">You can specify any amount of URLs on the command line. They are
fetched in a sequential manner in the specified order unless you use <i>-Z,
--parallel</i>. You can specify command line options and URLs mixed and in
any order on the command line.</p>
<p class="Pp">curl attempts to reuse connections when doing multiple transfers,
so that getting many files from the same server do not use multiple connects
and setup handshakes. This improves speed. Connection reuse can only be done
for URLs specified for a single command line invocation and cannot be
performed between separate curl runs.</p>
<p class="Pp">Provide an IPv6 zone id in the URL with an escaped percentage
sign. Like in</p>
<p class="Pp"></p>
<pre>"http://[fe80::3%25eth0]/"</pre>
<p class="Pp">Everything provided on the command line that is not a command line
option or its argument, curl assumes is a URL and treats it as such.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="GLOBBING"><a class="permalink" href="#GLOBBING">GLOBBING</a></h1>
<p class="Pp">You can specify multiple URLs or parts of URLs by writing lists
within braces or ranges within brackets. We call this
"globbing".</p>
<p class="Pp">Provide a list with three different names like this:</p>
<p class="Pp"></p>
<pre>"http://site.{one,two,three}.com"</pre>
<p class="Pp">Do sequences of alphanumeric series by using [] as in:</p>
<p class="Pp"></p>
<pre>"ftp://ftp.example.com/file[1-100].txt"</pre>
<p class="Pp">With leading zeroes:</p>
<p class="Pp"></p>
<pre>"ftp://ftp.example.com/file[001-100].txt"</pre>
<p class="Pp">With letters through the alphabet:</p>
<p class="Pp"></p>
<pre>"ftp://ftp.example.com/file[a-z].txt"</pre>
<p class="Pp">Nested sequences are not supported, but you can use several ones
next to each other:</p>
<p class="Pp"></p>
<pre>"http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html"</pre>
<p class="Pp">You can specify a step counter for the ranges to get every Nth
number or letter:</p>
<p class="Pp"></p>
<pre>"http://example.com/file[1-100:10].txt"
"http://example.com/file[a-z:2].txt"</pre>
<p class="Pp">When using [] or {} sequences when invoked from a command line
prompt, you probably have to put the full URL within double quotes to avoid
the shell from interfering with it. This also goes for other characters
treated special, like for example '&', '?' and '*'.</p>
<p class="Pp">Switch off globbing with <i>-g, --globoff</i>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="VARIABLES"><a class="permalink" href="#VARIABLES">VARIABLES</a></h1>
<p class="Pp">curl supports command line variables (added in 8.3.0). Set
variables with <i>--variable</i> name=content or <i>--variable</i> name@file
(where "file" can be stdin if set to a single dash (-)).</p>
<p class="Pp">Variable contents can be expanded in option parameters using
"{{name}}" if the option name is prefixed with
"<i>--expand-</i>". This gets the contents of the variable
"name" inserted, or a blank if the name does not exist as a
variable. Insert "{{" verbatim in the string by prefixing it with
a backslash, like "\{{".</p>
<p class="Pp">You access and expand environment variables by first importing
them. You select to either require the environment variable to be set or you
can provide a default value in case it is not already set. Plain
"<i>--variable</i> %name" imports the variable called
"name" but exits with an error if that environment variable is not
already set. To provide a default value if it is not set, use
"<i>--variable</i> %name=content" or "<i>--variable</i>
%name@content".</p>
<p class="Pp">Example. Get the USER environment variable into the URL, fail if
USER is not set:</p>
<p class="Pp"></p>
<pre>--variable '%USER'
--expand-url = "https://example.com/api/{{USER}}/method"</pre>
<p class="Pp">When expanding variables, curl supports a set of functions that
can make the variable contents more convenient to use. It can trim leading
and trailing white space with "trim", it can output the contents
as a JSON quoted string with "json", URL encode the string with
"url" or base64 encode it with "b64". To apply functions
to a variable expansion, add them colon separated to the right side of the
variable. Variable content holding null bytes that are not encoded when
expanded cause error.</p>
<p class="Pp">Example: get the contents of a file called $HOME/.secret into a
variable called "fix". Make sure that the content is trimmed and
percent-encoded when sent as POST data:</p>
<p class="Pp"></p>
<pre>--variable %HOME
--expand-variable fix@{{HOME}}/.secret
--expand-data "{{fix:trim:url}}"
https://example.com/</pre>
<p class="Pp">Command line variables and expansions were added in 8.3.0.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="OUTPUT"><a class="permalink" href="#OUTPUT">OUTPUT</a></h1>
<p class="Pp">If not told otherwise, curl writes the received data to stdout. It
can be instructed to instead save that data into a local file, using the
<i>-o, --output</i> or <i>-O, --remote-name</i> options. If curl is given
multiple URLs to transfer on the command line, it similarly needs multiple
options for where to save them.</p>
<p class="Pp">curl does not parse or otherwise "understand" the
content it gets or writes as output. It does no encoding or decoding, unless
explicitly asked to with dedicated command line options.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="PROTOCOLS"><a class="permalink" href="#PROTOCOLS">PROTOCOLS</a></h1>
<p class="Pp">curl supports numerous protocols, or put in URL terms: schemes.
Your particular build may not support them all.</p>
<dl class="Bl-tag">
<dt id="DICT"><a class="permalink" href="#DICT">DICT</a></dt>
<dd>Lets you lookup words using online dictionaries.</dd>
<dt id="FILE"><a class="permalink" href="#FILE">FILE</a></dt>
<dd>Read or write local files. curl does not support accessing file:// URL
remotely, but when running on Microsoft Windows using the native UNC
approach works.</dd>
<dt id="FTP(S)"><a class="permalink" href="#FTP(S)">FTP(S)</a></dt>
<dd>curl supports the File Transfer Protocol with a lot of tweaks and levers.
With or without using TLS.</dd>
<dt id="GOPHER(S)"><a class="permalink" href="#GOPHER(S)">GOPHER(S)</a></dt>
<dd>Retrieve files.</dd>
<dt id="HTTP(S)"><a class="permalink" href="#HTTP(S)">HTTP(S)</a></dt>
<dd>curl supports HTTP with numerous options and variations. It can speak HTTP
version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct
command line options.</dd>
<dt id="IMAP(S)"><a class="permalink" href="#IMAP(S)">IMAP(S)</a></dt>
<dd>Using the mail reading protocol, curl can download emails for you. With or
without using TLS.</dd>
<dt id="LDAP(S)"><a class="permalink" href="#LDAP(S)">LDAP(S)</a></dt>
<dd>curl can do directory lookups for you, with or without TLS.</dd>
<dt id="MQTT"><a class="permalink" href="#MQTT">MQTT</a></dt>
<dd>curl supports MQTT version 3. Downloading over MQTT equals subscribe to a
topic while uploading/posting equals publish on a topic. MQTT over TLS is
not supported (yet).</dd>
<dt id="POP3(S)"><a class="permalink" href="#POP3(S)">POP3(S)</a></dt>
<dd>Downloading from a pop3 server means getting a mail. With or without using
TLS.</dd>
<dt id="RTMP(S)"><a class="permalink" href="#RTMP(S)">RTMP(S)</a></dt>
<dd>The <b>Realtime Messaging Protocol</b> is primarily used to serve
streaming media and curl can download it.</dd>
<dt id="RTSP"><a class="permalink" href="#RTSP">RTSP</a></dt>
<dd>curl supports RTSP 1.0 downloads.</dd>
<dt id="SCP"><a class="permalink" href="#SCP">SCP</a></dt>
<dd>curl supports SSH version 2 scp transfers.</dd>
<dt id="SFTP"><a class="permalink" href="#SFTP">SFTP</a></dt>
<dd>curl supports SFTP (draft 5) done over SSH version 2.</dd>
<dt id="SMB(S)"><a class="permalink" href="#SMB(S)">SMB(S)</a></dt>
<dd>curl supports SMB version 1 for upload and download.</dd>
<dt id="SMTP(S)"><a class="permalink" href="#SMTP(S)">SMTP(S)</a></dt>
<dd>Uploading contents to an SMTP server means sending an email. With or
without TLS.</dd>
<dt id="TELNET"><a class="permalink" href="#TELNET">TELNET</a></dt>
<dd>Fetching a telnet URL starts an interactive session where it sends what it
reads on stdin and outputs what the server sends it.</dd>
<dt id="TFTP"><a class="permalink" href="#TFTP">TFTP</a></dt>
<dd>curl can do TFTP downloads and uploads.</dd>
<dt id="WS(S)"><a class="permalink" href="#WS(S)">WS(S)</a></dt>
<dd>WebSocket done over HTTP/1. WSS implies that it works over HTTPS.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="PROGRESS_METER"><a class="permalink" href="#PROGRESS_METER">PROGRESS
METER</a></h1>
<p class="Pp">curl normally displays a progress meter during operations,
indicating the amount of transferred data, transfer speeds and estimated
time left, etc. The progress meter displays the transfer rate in bytes per
second. The suffixes (k, M, G, T, P) are 1024 based. For example 1k is 1024
bytes. 1M is 1048576 bytes.</p>
<p class="Pp">curl displays this data to the terminal by default, so if you
invoke curl to do an operation and it is about to write data to the
terminal, it <i>disables</i> the progress meter as otherwise it would mess
up the output mixing progress meter and response data.</p>
<p class="Pp">If you want a progress meter for HTTP POST or PUT requests, you
need to redirect the response output to a file, using shell redirect (>),
<i>-o, --output</i> or similar.</p>
<p class="Pp">This does not apply to FTP upload as that operation does not spit
out any response data to the terminal.</p>
<p class="Pp">If you prefer a progress bar instead of the regular meter, <i>-#,
--progress-bar</i> is your friend. You can also disable the progress meter
completely with the <i>-s, --silent</i> option.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="VERSION"><a class="permalink" href="#VERSION">VERSION</a></h1>
<p class="Pp">This man page describes curl 8.10.1. If you use a later version,
chances are this man page does not fully document it. If you use an earlier
version, this document tries to include version information about which
specific version that introduced changes.</p>
<p class="Pp">You can always learn which the latest curl version is by
running</p>
<p class="Pp"></p>
<pre>curl https://curl.se/info</pre>
<p class="Pp">The online version of this man page is always showing the latest
incarnation: https://curl.se/docs/manpage.html</p>
</section>
<section class="Sh">
<h1 class="Sh" id="OPTIONS"><a class="permalink" href="#OPTIONS">OPTIONS</a></h1>
<p class="Pp">Options start with one or two dashes. Many of the options require
an additional value next to them. If provided text does not start with a
dash, it is presumed to be and treated as a URL.</p>
<p class="Pp">The short "single-dash" form of the options, -d for
example, may be used with or without a space between it and its value,
although a space is a recommended separator. The long double-dash form,
<i>-d, --data</i> for example, requires a space between it and its
value.</p>
<p class="Pp">Short version options that do not need any additional values can
be used immediately next to each other, like for example you can specify all
the options <i>-O</i>, <i>-L</i> and <i>-v</i> at once as <i>-OLv</i>.</p>
<p class="Pp">In general, all boolean options are enabled with --<b>option</b>
and yet again disabled with --<b>no-</b>option. That is, you use the same
option name but prefix it with "no-". However, in this list we
mostly only list and show the --<b>option</b> version of them.</p>
<p class="Pp">When <i>-:, --next</i> is used, it resets the parser state and you
start again with a clean option state, except for the options that are
global. Global options retain their values and meaning even after <i>-:,
--next</i>.</p>
<p class="Pp">The following options are global: <i>--fail-early</i>,
<i>--libcurl</i>, <i>--parallel-immediate</i>, <i>--parallel-max</i>, <i>-Z,
--parallel</i>, <i>-#, --progress-bar</i>, <i>--rate</i>, <i>-S,
--show-error</i>, <i>--stderr</i>, <i>--styled-output</i>,
<i>--trace-ascii</i>, <i>--trace-config</i>, <i>--trace-ids</i>,
<i>--trace-time</i>, <i>--trace</i> and <i>-v, --verbose</i>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="ALL_OPTIONS"><a class="permalink" href="#ALL_OPTIONS">ALL
OPTIONS</a></h1>
<dl class="Bl-tag">
<dt id="abstract"><a class="permalink" href="#abstract">--abstract-unix-socket
<path></a></dt>
<dd>(HTTP) Connect through an abstract Unix domain socket, instead of using
the network. Note: netstat shows the path of an abstract socket prefixed
with "@", however the <path> argument should not have this
leading character.
<p class="Pp">If --abstract-unix-socket is provided several times, the last
set value is used.</p>
<p class="Pp">Example:</p>
<pre>curl --abstract-unix-socket socketpath https://example.com</pre>
<p class="Pp">See also <i>--unix-socket</i>.</p>
</dd>
<dt id="alt"><a class="permalink" href="#alt">--alt-svc
<filename></a></dt>
<dd>(HTTPS) Enable the alt-svc parser. If the filename points to an existing
alt-svc cache file, that gets used. After a completed transfer, the cache
is saved to the filename again if it has been modified.
<p class="Pp">Specify a "" filename (zero length) to avoid
loading/saving and make curl just handle the cache in memory.</p>
<p class="Pp">If this option is used several times, curl loads contents from
all the files but the last one is used for saving.</p>
<p class="Pp">--alt-svc can be used several times in a command line</p>
<p class="Pp">Example:</p>
<pre>curl --alt-svc svc.txt https://example.com</pre>
<p class="Pp">Added in 7.64.1. See also <i>--resolve</i> and
<i>--connect-to</i>.</p>
</dd>
<dt id="anyauth"><a class="permalink" href="#anyauth">--anyauth</a></dt>
<dd>(HTTP) Figure out authentication method automatically, and use the most
secure one the remote site claims to support. This is done by first doing
a request and checking the response-headers, thus possibly inducing an
extra network round-trip. This option is used instead of setting a
specific authentication method, which you can do with <i>--basic</i>,
<i>--digest</i>, <i>--ntlm</i>, and <i>--negotiate</i>.
<p class="Pp">Using <i>--anyauth</i> is not recommended if you do uploads
from stdin, since it may require data to be sent twice and then the
client must be able to rewind. If the need should arise when uploading
from stdin, the upload operation fails.</p>
<p class="Pp">Used together with <i>-u, --user</i>.</p>
<p class="Pp">Providing --anyauth multiple times has no extra effect.</p>
<p class="Pp">Example:</p>
<pre>curl --anyauth --user me:pwd https://example.com</pre>
<p class="Pp">See also <i>--proxy-anyauth</i>, <i>--basic</i> and
<i>--digest</i>.</p>
</dd>
<dt id="a,"><a class="permalink" href="#a,">-a, --append</a></dt>
<dd>(FTP SFTP) When used in an upload, this option makes curl append to the
target file instead of overwriting it. If the remote file does not exist,
it is created. Note that this flag is ignored by some SFTP servers
(including OpenSSH).
<p class="Pp">Providing --append multiple times has no extra effect. Disable
it again with --no-append.</p>
<p class="Pp">Example:</p>
<pre>curl --upload-file local --append ftp://example.com/</pre>
<p class="Pp">See also <i>-r, --range</i> and <i>-C, --continue-at</i>.</p>
</dd>
<dt id="aws"><a class="permalink" href="#aws">--aws-sigv4
<provider1[:prvdr2[:reg[:srv]]]></a></dt>
<dd>(HTTP) Use AWS V4 signature authentication in the transfer.
<p class="Pp">The provider argument is a string that is used by the
algorithm when creating outgoing authentication headers.</p>
<p class="Pp">The region argument is a string that points to a geographic
area of a resources collection (region-code) when the region name is
omitted from the endpoint.</p>
<p class="Pp">The service argument is a string that points to a function
provided by a cloud (service-code) when the service name is omitted from
the endpoint.</p>
<p class="Pp">If --aws-sigv4 is provided several times, the last set value
is used.</p>
<p class="Pp">Example:</p>
<pre>curl --aws-sigv4 "aws:amz:us-east-2:es" --user "key:secret" https://example.com</pre>
<p class="Pp">Added in 7.75.0. See also <i>--basic</i> and <i>-u,
--user</i>.</p>
</dd>
<dt id="basic"><a class="permalink" href="#basic">--basic</a></dt>
<dd>(HTTP) Use HTTP Basic authentication with the remote host. This method is
the default and this option is usually pointless, unless you use it to
override a previously set option that sets a different authentication
method (such as <i>--ntlm</i>, <i>--digest</i>, or <i>--negotiate</i>).
<p class="Pp">Used together with <i>-u, --user</i>.</p>
<p class="Pp">Providing --basic multiple times has no extra effect.</p>
<p class="Pp">Example:</p>
<pre>curl -u name:password --basic https://example.com</pre>
<p class="Pp">See also <i>--proxy-basic</i>.</p>
</dd>
<dt id="ca"><a class="permalink" href="#ca">--ca-native</a></dt>
<dd>(TLS) Use the CA store from the native operating system to verify the
peer. By default, curl otherwise uses a CA store provided in a single file
or directory, but when using this option it interfaces the operating
system's own vault.
<p class="Pp">This option works for curl on Windows when built to use
OpenSSL, wolfSSL (added in 8.3.0) or GnuTLS (added in 8.5.0). When curl
on Windows is built to use Schannel, this feature is implied and curl
then only uses the native CA store.</p>
<p class="Pp">Providing --ca-native multiple times has no extra effect.
Disable it again with --no-ca-native.</p>
<p class="Pp">Example:</p>
<pre>curl --ca-native https://example.com</pre>
<p class="Pp">Added in 8.2.0. See also <i>--cacert</i>, <i>--capath</i>,
<i>--dump-ca-embed</i> and <i>-k, --insecure</i>.</p>
</dd>
<dt id="cacert"><a class="permalink" href="#cacert">--cacert
<file></a></dt>
<dd>(TLS) Use the specified certificate file to verify the peer. The file may
contain multiple CA certificates. The certificate(s) must be in PEM
format. Normally curl is built to use a default file for this, so this
option is typically used to alter that default file.
<p class="Pp">curl recognizes the environment variable named
'CURL_CA_BUNDLE' if it is set and the TLS backend is not Schannel, and
uses the given path as a path to a CA cert bundle. This option overrides
that variable.</p>
<p class="Pp">The Windows version of curl automatically looks for a CA certs
file named 'curl-ca-bundle.crt', either in the same directory as
curl.exe, or in the Current Working Directory, or in any folder along
your PATH.</p>
<p class="Pp">(iOS and macOS only) If curl is built against Secure
Transport, then this option is supported for backward compatibility with
other SSL engines, but it should not be set. If the option is not set,
then curl uses the certificates in the system and user Keychain to
verify the peer, which is the preferred method of verifying the peer's
certificate chain.</p>
<p class="Pp">(Schannel only) This option is supported for Schannel in
Windows 7 or later (added in 7.60.0). This option is supported for
backward compatibility with other SSL engines; instead it is recommended
to use Windows' store of root certificates (the default for
Schannel).</p>
<p class="Pp">If --cacert is provided several times, the last set value is
used.</p>
<p class="Pp">Example:</p>
<pre>curl --cacert CA-file.txt https://example.com</pre>
<p class="Pp">See also <i>--capath</i>, <i>--dump-ca-embed</i> and <i>-k,
--insecure</i>.</p>
</dd>
<dt id="capath"><a class="permalink" href="#capath">--capath
<dir></a></dt>
<dd>(TLS) Use the specified certificate directory to verify the peer. Multiple
paths can be provided by separated with colon (":") (e.g.
"path1:path2:path3"). The certificates must be in PEM format,
and if curl is built against OpenSSL, the directory must have been
processed using the c_rehash utility supplied with OpenSSL. Using
<i>--capath</i> can allow OpenSSL-powered curl to make SSL-connections
much more efficiently than using <i>--cacert</i> if the <i>--cacert</i>
file contains many CA certificates.
<p class="Pp">If this option is set, the default capath value is
ignored.</p>
<p class="Pp">If --capath is provided several times, the last set value is
used.</p>
<p class="Pp">Example:</p>
<pre>curl --capath /local/directory https://example.com</pre>
<p class="Pp">See also <i>--cacert</i>, <i>--dump-ca-embed</i> and <i>-k,
--insecure</i>.</p>
</dd>
<dt id="E,"><a class="permalink" href="#E,">-E, --cert
<certificate[:password]></a></dt>
<dd>(TLS) Use the specified client certificate file when getting a file with
HTTPS, FTPS or another SSL-based protocol. The certificate must be in
PKCS#12 format if using Secure Transport, or PEM format if using any other
engine. If the optional password is not specified, it is queried for on
the terminal. Note that this option assumes a certificate file that is the
private key and the client certificate concatenated. See <i>-E, --cert</i>
and <i>--key</i> to specify them independently.
<p class="Pp">In the <certificate> portion of the argument, you must
escape the character ":" as "\:" so that it is not
recognized as the password delimiter. Similarly, you must escape the
double quote character as \" so that it is not recognized as an
escape character.</p>
<p class="Pp">If curl is built against OpenSSL library, and the engine
pkcs11 is available, then a PKCS#11 URI (RFC 7512) can be used to
specify a certificate located in a PKCS#11 device. A string beginning
with "pkcs11:" is interpreted as a PKCS#11 URI. If a PKCS#11
URI is provided, then the <i>--engine</i> option is set as
"pkcs11" if none was provided and the <i>--cert-type</i>
option is set as "ENG" if none was provided.</p>
<p class="Pp">(iOS and macOS only) If curl is built against Secure
Transport, then the certificate string can either be the name of a
certificate/private key in the system or user keychain, or the path to a
PKCS#12-encoded certificate and private key. If you want to use a file
from the current directory, please precede it with "./"
prefix, in order to avoid confusion with a nickname.</p>
<p class="Pp">(Schannel only) Client certificates must be specified by a
path expression to a certificate store. (Loading <i>PFX</i> is not
supported; you can import it to a store first). You can use
"<store location>\<store name>\<thumbprint>"
to refer to a certificate in the system certificates store, for example,
<i>"CurrentUser\MY\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a"</i>.
Thumbprint is usually a SHA-1 hex string which you can see in
certificate details. Following store locations are supported:
<i>CurrentUser</i>, <i>LocalMachine</i>, <i>CurrentService</i>,
<i>Services</i>, <i>CurrentUserGroupPolicy</i>,
<i>LocalMachineGroupPolicy</i> and <i>LocalMachineEnterprise</i>.</p>
<p class="Pp">If --cert is provided several times, the last set value is
used.</p>
<p class="Pp">Example:</p>
<pre>curl --cert certfile --key keyfile https://example.com</pre>
<p class="Pp">See also <i>--cert-type</i>, <i>--key</i> and
<i>--key-type</i>.</p>
</dd>
<dt id="cert"><a class="permalink" href="#cert">--cert-status</a></dt>
<dd>(TLS) Verify the status of the server certificate by using the Certificate
Status Request (aka. OCSP stapling) TLS extension.
<p class="Pp">If this option is enabled and the server sends an invalid
(e.g. expired) response, if the response suggests that the server
certificate has been revoked, or no response at all is received, the
verification fails.</p>
<p class="Pp">This support is currently only implemented in the OpenSSL and
GnuTLS backends.</p>
<p class="Pp">Providing --cert-status multiple times has no extra effect.
Disable it again with --no-cert-status.</p>
<p class="Pp">Example:</p>
<pre>curl --cert-status https://example.com</pre>
<p class="Pp">See also <i>--pinnedpubkey</i>.</p>
</dd>
<dt id="cert~2"><a class="permalink" href="#cert~2">--cert-type
<type></a></dt>
<dd>(TLS) Set type of the provided client certificate. PEM, DER, ENG and P12
are recognized types.
<p class="Pp">The default type depends on the TLS backend and is usually
PEM, however for Secure Transport and Schannel it is P12. If <i>-E,
--cert</i> is a pkcs11: URI then ENG is the default type.</p>
<p class="Pp">If --cert-type is provided several times, the last set value
is used.</p>
<p class="Pp">Example:</p>
<pre>curl --cert-type PEM --cert file https://example.com</pre>
<p class="Pp">See also <i>-E, --cert</i>, <i>--key</i> and
<i>--key-type</i>.</p>
</dd>
<dt id="ciphers"><a class="permalink" href="#ciphers">--ciphers
<list></a></dt>
<dd>(TLS) Specifies which cipher suites to use in the connection if it
negotiates TLS 1.2 (1.1, 1.0). The list of ciphers suites must specify
valid ciphers. Read up on cipher suite details on this URL:
<p class="Pp">https://curl.se/docs/ssl-ciphers.html</p>
<p class="Pp">If --ciphers is provided several times, the last set value is
used.</p>
<p class="Pp">Example:</p>
<pre>curl --ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256 https://example.com</pre>
<p class="Pp">See also <i>--tls13-ciphers</i>, <i>--proxy-ciphers</i> and
<i>--curves</i>.</p>
</dd>
<dt id="compressed"><a class="permalink" href="#compressed">--compressed</a></dt>
<dd>(HTTP) Request a compressed response using one of the algorithms curl
supports, and automatically decompress the content.
<p class="Pp">Response headers are not modified when saved, so if they are
"interpreted" separately again at a later point they might
appear to be saying that the content is (still) compressed; while in
fact it has already been decompressed.</p>
<p class="Pp">If this option is used and the server sends an unsupported
encoding, curl reports an error. This is a request, not an order; the
server may or may not deliver data compressed.</p>
<p class="Pp">Providing --compressed multiple times has no extra effect.
Disable it again with --no-compressed.</p>
<p class="Pp">Example:</p>
<pre>curl --compressed https://example.com</pre>
<p class="Pp">See also <i>--compressed-ssh</i>.</p>
</dd>
<dt>--compressed-ssh</dt>
<dd>(SCP SFTP) Enables built-in SSH compression. This is a request, not an
order; the server may or may not do it.
<p class="Pp">Providing --compressed-ssh multiple times has no extra effect.
Disable it again with --no-compressed-ssh.</p>
<p class="Pp">Example:</p>
<pre>curl --compressed-ssh sftp://example.com/</pre>
<p class="Pp">See also <i>--compressed</i>.</p>
</dd>
<dt id="K,"><a class="permalink" href="#K,">-K, --config <file></a></dt>
<dd>Specify a text file to read curl arguments from. The command line
arguments found in the text file are used as if they were provided on the
command line.
<p class="Pp">Options and their parameters must be specified on the same
line in the file, separated by whitespace, colon, or the equals sign.
Long option names can optionally be given in the config file without the
initial double dashes and if so, the colon or equals characters can be
used as separators. If the option is specified with one or two dashes,
there can be no colon or equals character between the option and its
parameter.</p>
<p class="Pp">If the parameter contains whitespace or starts with a colon
(:) or equals sign (=), it must be specified enclosed within double
quotes ("like this"). Within double quotes the following
escape sequences are available: \\, \", \t, \n, \r and \v. A
backslash preceding any other letter is ignored.</p>
<p class="Pp">If the first non-blank column of a config line is a '#'
character, that line is treated as a comment.</p>
<p class="Pp">Only write one option per physical line in the config file. A
single line is required to be no more than 10 megabytes (since
8.2.0).</p>
<p class="Pp">Specify the filename to <i>-K, --config</i> as minus
"-" to make curl read the file from stdin.</p>
<p class="Pp">Note that to be able to specify a URL in the config file, you
need to specify it using the <i>--url</i> option, and not by simply
writing the URL on its own line. So, it could look similar to this:</p>
<p class="Pp"></p>
<pre>url = "https://curl.se/docs/"
# --- Example file ---
# this is a comment
url = "example.com"
output = "curlhere.html"
user-agent = "superagent/1.0"
# and fetch another URL too
url = "example.com/docs/manpage.html"
-O
referer = "http://nowhereatall.example.com/"
# --- End of example file ---</pre>
<p class="Pp">When curl is invoked, it (unless <i>-q, --disable</i> is used)
checks for a default config file and uses it if found, even when <i>-K,
--config</i> is used. The default config file is checked for in the
following places in this order:</p>
<p class="Pp">1) <b>"$CURL_HOME/.curlrc"</b></p>
<p class="Pp">2) <b>"$XDG_CONFIG_HOME/curlrc"</b> (Added in
7.73.0)</p>
<p class="Pp">3) <b>"$HOME/.curlrc"</b></p>
<p class="Pp">4) Windows: <b>"%USERPROFILE%\.curlrc"</b></p>
<p class="Pp">5) Windows: <b>"%APPDATA%\.curlrc"</b></p>
<p class="Pp">6) Windows: <b>"%USERPROFILE%\Application
Data\.curlrc"</b></p>
<p class="Pp">7) Non-Windows: use getpwuid to find the home directory</p>
<p class="Pp">8) On Windows, if it finds no <i>.curlrc</i> file in the
sequence described above, it checks for one in the same directory the
curl executable is placed.</p>
<p class="Pp">On Windows two filenames are checked per location:
<i>.curlrc</i> and <i>_curlrc</i>, preferring the former. Older versions
on Windows checked for <i>_curlrc</i> only.</p>
<p class="Pp">--config can be used several times in a command line</p>
<p class="Pp">Example:</p>
<pre>curl --config file.txt https://example.com</pre>
<p class="Pp">See also <i>-q, --disable</i>.</p>
</dd>
<dt id="connect"><a class="permalink" href="#connect">--connect-timeout
<seconds></a></dt>
<dd>Maximum time in seconds that you allow curl's connection to take. This
only limits the connection phase, so if curl connects within the given
period it continues - if not it exits.
<p class="Pp">This option accepts decimal values. The decimal value needs to
be provided using a dot (.) as decimal separator - not the local version
even if it might be using another separator.</p>
<p class="Pp">The connection phase is considered complete when the DNS
lookup and requested TCP, TLS or QUIC handshakes are done.</p>
<p class="Pp">If --connect-timeout is provided several times, the last set
value is used.</p>
<p class="Pp">Examples:</p>
<pre>curl --connect-timeout 20 https://example.com
curl --connect-timeout 3.14 https://example.com</pre>
<p class="Pp">See also <i>-m, --max-time</i>.</p>
</dd>
<dt id="connect~2"><a class="permalink" href="#connect~2">--connect-to
<HOST1:PORT1:HOST2:PORT2></a></dt>
<dd>For a request intended for the "HOST1:PORT1" pair, connect to
"HOST2:PORT2" instead. This option is only used to establish the
network connection. It does NOT affect the hostname/port number that is
used for TLS/SSL (e.g. SNI, certificate verification) or for the
application protocols.
<p class="Pp">"HOST1" and "PORT1" may be empty strings,
meaning any host or any port number. "HOST2" and
"PORT2" may also be empty strings, meaning use the request's
original hostname and port number.</p>
<p class="Pp">A hostname specified to this option is compared as a string,
so it needs to match the name used in request URL. It can be either
numerical such as "127.0.0.1" or the full host name such as
"example.org".</p>
<p class="Pp">Example: redirect connects from the example.com hostname to
127.0.0.1 independently of port number:</p>
<p class="Pp"></p>
<pre>curl --connect-to example.com::127.0.0.1: https://example.com/</pre>
<p class="Pp">Example: redirect connects from all hostnames to 127.0.0.1
independently of port number:</p>
<p class="Pp"></p>
<pre>curl --connect-to ::127.0.0.1: http://example.com/</pre>
<p class="Pp">--connect-to can be used several times in a command line</p>
<p class="Pp">Example:</p>
<pre>curl --connect-to example.com:443:example.net:8443 https://example.com</pre>
<p class="Pp">See also <i>--resolve</i> and <i>-H, --header</i>.</p>
</dd>
<dt id="C,"><a class="permalink" href="#C,">-C, --continue-at
<offset></a></dt>
<dd>Resume a previous transfer from the given byte offset. The given offset is
the exact number of bytes that are skipped, counting from the beginning of
the source file before it is transferred to the destination. If used with
uploads, the FTP server command SIZE is not used by curl.
<p class="Pp">Use "-C -" to instruct curl to automatically find
out where/how to resume the transfer. It then uses the given
output/input files to figure that out.</p>
<p class="Pp">If --continue-at is provided several times, the last set value
is used.</p>
<p class="Pp">Examples:</p>
<pre>curl -C - https://example.com
curl -C 400 https://example.com</pre>
<p class="Pp">See also <i>-r, --range</i>.</p>
</dd>
<dt id="b,"><a class="permalink" href="#b,">-b, --cookie
<data|filename></a></dt>
<dd>(HTTP) This option has two slightly separate cookie sending functions.
<p class="Pp">Either: pass the exact data to send to the HTTP server in the
Cookie header. It is supposedly data previously received from the server
in a "Set-Cookie:" line. The data should be in the format
"NAME1=VALUE1; NAME2=VALUE2". When given a set of specific
cookies, curl populates its cookie header with this content explicitly
in all outgoing request(s). If multiple requests are done due to
authentication, followed redirects or similar, they all get this cookie
header passed on.</p>
<p class="Pp">Or: If no "=" symbol is used in the argument, it is
instead treated as a filename to read previously stored cookie from.
This option also activates the cookie engine which makes curl record
incoming cookies, which may be handy if you are using this in
combination with the <i>-L, --location</i> option or do multiple URL
transfers on the same invoke.</p>
<p class="Pp">If the filename is a single minus ("-"), curl reads
the contents from stdin. If the filename is an empty string
("") and is the only cookie input, curl activates the cookie
engine without any cookies.</p>
<p class="Pp">The file format of the file to read cookies from should be
plain HTTP headers (Set-Cookie style) or the Netscape/Mozilla cookie
file format.</p>
<p class="Pp">The file specified with <i>-b, --cookie</i> is only used as
input. No cookies are written to that file. To store cookies, use the
<i>-c, --cookie-jar</i> option.</p>
<p class="Pp">If you use the Set-Cookie file format and do not specify a
domain then the cookie is not sent since the domain never matches. To
address this, set a domain in Set-Cookie line (doing that includes
subdomains) or preferably: use the Netscape format.</p>
<p class="Pp">Users often want to both read cookies from a file and write
updated cookies back to a file, so using both <i>-b, --cookie</i> and
<i>-c, --cookie-jar</i> in the same command line is common.</p>
<p class="Pp">If curl is built with PSL (<b>Public Suffix List</b>) support,
it detects and discards cookies that are specified for such suffix
domains that should not be allowed to have cookies. If curl is
<i>not</i> built with PSL support, it has no ability to stop super
cookies.</p>
<p class="Pp">--cookie can be used several times in a command line</p>
<p class="Pp">Examples:</p>
<pre>curl -b "" https://example.com
curl -b cookiefile https://example.com
curl -b cookiefile -c cookiefile https://example.com
curl -b name=Jane https://example.com</pre>
<p class="Pp">See also <i>-c, --cookie-jar</i> and <i>-j,
--junk-session-cookies</i>.</p>
</dd>
<dt id="c,"><a class="permalink" href="#c,">-c, --cookie-jar
<filename></a></dt>
<dd>(HTTP) Specify to which file you want curl to write all cookies after a
completed operation. Curl writes all cookies from its in-memory cookie
storage to the given file at the end of operations. Even if no cookies are
known, a file is created so that it removes any formerly existing cookies
from the file. The file uses the Netscape cookie file format. If you set
the filename to a single minus, "-", the cookies are written to
stdout.
<p class="Pp">The file specified with <i>-c, --cookie-jar</i> is only used
for output. No cookies are read from the file. To read cookies, use the
<i>-b, --cookie</i> option. Both options can specify the same file.</p>
<p class="Pp">This command line option activates the cookie engine that
makes curl record and use cookies. The <i>-b, --cookie</i> option also
activates it.</p>
<p class="Pp">If the cookie jar cannot be created or written to, the whole
curl operation does not fail or even report an error clearly. Using
<i>-v, --verbose</i> gets a warning displayed, but that is the only
visible feedback you get about this possibly lethal situation.</p>
<p class="Pp">If --cookie-jar is provided several times, the last set value
is used.</p>
<p class="Pp">Examples:</p>
<pre>curl -c store-here.txt https://example.com
curl -c store-here.txt -b read-these https://example.com</pre>
<p class="Pp">See also <i>-b, --cookie</i> and <i>-j,
--junk-session-cookies</i>.</p>
</dd>
<dt id="create"><a class="permalink" href="#create">--create-dirs</a></dt>
<dd>When used in conjunction with the <i>-o, --output</i> option, curl creates
the necessary local directory hierarchy as needed. This option creates the
directories mentioned with the <i>-o, --output</i> option combined with
the path possibly set with <i>--output-dir</i>. If the combined output
filename uses no directory, or if the directories it mentions already
exist, no directories are created.
<p class="Pp">Created directories are made with mode 0750 on Unix-style file
systems.</p>
<p class="Pp">To create remote directories when using FTP or SFTP, try
<i>--ftp-create-dirs</i>.</p>
<p class="Pp">Providing --create-dirs multiple times has no extra effect.
Disable it again with --no-create-dirs.</p>
<p class="Pp">Example:</p>
<pre>curl --create-dirs --output local/dir/file https://example.com</pre>
<p class="Pp">See also <i>--ftp-create-dirs</i> and <i>--output-dir</i>.</p>
</dd>
<dt id="create~2"><a class="permalink" href="#create~2">--create-file-mode
<mode></a></dt>
<dd>(SFTP SCP FILE) When curl is used to create files remotely using one of
the supported protocols, this option allows the user to set which 'mode'
to set on the file at creation time, instead of the default 0644.
<p class="Pp">This option takes an octal number as argument.</p>
<p class="Pp">If --create-file-mode is provided several times, the last set
value is used.</p>
<p class="Pp">Example:</p>
<pre>curl --create-file-mode 0777 -T localfile sftp://example.com/new</pre>
<p class="Pp">Added in 7.75.0. See also <i>--ftp-create-dirs</i>.</p>
</dd>
<dt id="crlf"><a class="permalink" href="#crlf">--crlf</a></dt>
<dd>(FTP SMTP) Convert line feeds to carriage return plus line feeds in
upload. Useful for <b>MVS (OS/390)</b>.
<p class="Pp">Providing --crlf multiple times has no extra effect. Disable
it again with --no-crlf.</p>
<p class="Pp">Example:</p>
<pre>curl --crlf -T file ftp://example.com/</pre>
<p class="Pp">See also <i>-B, --use-ascii</i>.</p>
</dd>
<dt id="crlfile"><a class="permalink" href="#crlfile">--crlfile
<file></a></dt>
<dd>(TLS) Provide a file using PEM format with a Certificate Revocation List
that may specify peer certificates that are to be considered revoked.
<p class="Pp">If --crlfile is provided several times, the last set value is
used.</p>
<p class="Pp">Example:</p>
<pre>curl --crlfile rejects.txt https://example.com</pre>
<p class="Pp">See also <i>--cacert</i> and <i>--capath</i>.</p>
</dd>
<dt id="curves"><a class="permalink" href="#curves">--curves
<list></a></dt>
<dd>(TLS) Set specific curves to use during SSL session establishment
according to RFC 8422, 5.1. Multiple algorithms can be provided by
separating them with ":" (e.g. "X25519:P-521"). The
parameter is available identically in the OpenSSL "s_client" and
"s_server" utilities.
<p class="Pp"><i>--curves</i> allows a OpenSSL powered curl to make
SSL-connections with exactly the (EC) curve requested by the client,
avoiding nontransparent client/server negotiations.</p>
<p class="Pp">If this option is set, the default curves list built into
OpenSSL are ignored.</p>
<p class="Pp">If --curves is provided several times, the last set value is
used.</p>
<p class="Pp">Example:</p>
<pre>curl --curves X25519 https://example.com</pre>
<p class="Pp">Added in 7.73.0. See also <i>--ciphers</i>.</p>
</dd>
<dt id="d,"><a class="permalink" href="#d,">-d, --data <data></a></dt>
<dd>(HTTP MQTT) Sends the specified data in a POST request to the HTTP server,
in the same way that a browser does when a user has filled in an HTML form
and presses the submit button. This option makes curl pass the data to the
server using the content-type application/x-www-form-urlencoded. Compare
to <i>-F, --form</i>.
<p class="Pp"><i>--data-raw</i> is almost the same but does not have a
special interpretation of the @ character. To post data purely binary,
you should instead use the <i>--data-binary</i> option. To URL-encode
the value of a form field you may use <i>--data-urlencode</i>.</p>
<p class="Pp">If any of these options is used more than once on the same
command line, the data pieces specified are merged with a separating
&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate
a post chunk that looks like 'name=daniel&skill=lousy'.</p>
<p class="Pp">If you start the data with the letter @, the rest should be a
filename to read the data from, or - if you want curl to read the data
from stdin. Posting data from a file named 'foobar' would thus be done
with <i>-d, --data</i> @foobar. When <i>-d, --data</i> is told to read
from a file like that, carriage returns, newlines and null bytes are
stripped out. If you do not want the @ character to have a special
interpretation use <i>--data-raw</i> instead.</p>
<p class="Pp">The data for this option is passed on to the server exactly as
provided on the command line. curl does not convert, change or improve
it. It is up to the user to provide the data in the correct form.</p>
<p class="Pp">--data can be used several times in a command line</p>
<p class="Pp">Examples:</p>
<pre>curl -d "name=curl" https://example.com
curl -d "name=curl" -d "tool=cmdline" https://example.com
curl -d @filename https://example.com</pre>
<p class="Pp">This option is mutually exclusive with <i>-F, --form</i>,
<i>-I, --head</i> and <i>-T, --upload-file</i>. See also
<i>--data-binary</i>, <i>--data-urlencode</i> and <i>--data-raw</i>.</p>
</dd>
<dt id="data"><a class="permalink" href="#data">--data-ascii
<data></a></dt>
<dd>(HTTP) This option is just an alias for <i>-d, --data</i>.
<p class="Pp">--data-ascii can be used several times in a command line</p>
<p class="Pp">Example:</p>
<pre>curl --data-ascii @file https://example.com</pre>
<p class="Pp">See also <i>--data-binary</i>, <i>--data-raw</i> and
<i>--data-urlencode</i>.</p>
</dd>
<dt id="data~2"><a class="permalink" href="#data~2">--data-binary
<data></a></dt>
<dd>(HTTP) Post data exactly as specified with no extra processing whatsoever.
<p class="Pp">If you start the data with the letter @, the rest should be a
filename. "@-" makes curl read the data from stdin. Data is
posted in a similar manner as <i>-d, --data</i> does, except that
newlines and carriage returns are preserved and conversions are never
done.</p>
<p class="Pp">Like <i>-d, --data</i> the default content-type sent to the
server is application/x-www-form-urlencoded. If you want the data to be
treated as arbitrary binary data by the server then set the content-type
to octet-stream: -H "Content-Type:
application/octet-stream".</p>
<p class="Pp">If this option is used several times, the ones following the
first append data as described in <i>-d, --data</i>.</p>
<p class="Pp">--data-binary can be used several times in a command line</p>
<p class="Pp">Example:</p>
<pre>curl --data-binary @filename https://example.com</pre>
<p class="Pp">See also <i>--data-ascii</i>.</p>
</dd>
<dt id="data~3"><a class="permalink" href="#data~3">--data-raw
<data></a></dt>
<dd>(HTTP) Post data similarly to <i>-d, --data</i> but without the special
interpretation of the @ character.
<p class="Pp">--data-raw can be used several times in a command line</p>
<p class="Pp">Examples:</p>
<pre>curl --data-raw "hello" https://example.com
curl --data-raw "@at@at@" https://example.com</pre>
<p class="Pp">See also <i>-d, --data</i>.</p>
</dd>
<dt id="data~4"><a class="permalink" href="#data~4">--data-urlencode
<data></a></dt>
<dd>(HTTP) Post data, similar to the other <i>-d, --data</i> options with the
exception that this performs URL-encoding.
<p class="Pp">To be CGI-compliant, the <data> part should begin with a
<i>name</i> followed by a separator and a content specification. The
<data> part can be passed to curl using one of the following
syntaxes:</p>
</dd>
</dl>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt id="content"><a class="permalink" href="#content">content</a></dt>
<dd>URL-encode the content and pass that on. Just be careful so that the
content does not contain any "=" or "@" symbols, as
that makes the syntax match one of the other cases below!</dd>
<dt>=content</dt>
<dd>URL-encode the content and pass that on. The preceding "="
symbol is not included in the data.</dd>
<dt id="name=content"><a class="permalink" href="#name=content">name=content</a></dt>
<dd>URL-encode the content part and pass that on. Note that the name part is
expected to be URL-encoded already.</dd>
<dt>@filename</dt>
<dd>load data from the given file (including any newlines), URL-encode that
data and pass it on in the POST. Using "@-" makes curl read the
data from stdin.</dd>
<dt id="name@filename"><a class="permalink" href="#name@filename">name@filename</a></dt>
<dd>load data from the given file (including any newlines), URL-encode that
data and pass it on in the POST. The name part gets an equal sign
appended, resulting in <i>name=urlencoded-file-content</i>. Note that the
name is expected to be URL-encoded already.</dd>
</dl>
</div>
<dl class="Bl-tag">
<dt></dt>
<dd>
<p class="Pp">--data-urlencode can be used several times in a command
line</p>
<p class="Pp">Examples:</p>
<pre>curl --data-urlencode name=val https://example.com
curl --data-urlencode =encodethis https://example.com
curl --data-urlencode name@file https://example.com
curl --data-urlencode @fileonly https://example.com</pre>
<p class="Pp">See also <i>-d, --data</i> and <i>--data-raw</i>.</p>
</dd>
<dt id="delegation"><a class="permalink" href="#delegation">--delegation
<LEVEL></a></dt>
<dd>(GSS/kerberos) Set LEVEL what curl is allowed to delegate when it comes to
user credentials.</dd>
</dl>
<div class="Bd-indent">
<dl class="Bl-tag">
<dt id="none"><a class="permalink" href="#none">none</a></dt>
<dd>Do not allow any delegation.</dd>
<dt id="policy"><a class="permalink" href="#policy">policy</a></dt>
<dd>Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
service ticket, which is a matter of realm policy.</dd>
<dt id="always"><a class="permalink" href="#always">always</a></dt>
<dd>Unconditionally allow the server to delegate.</dd>
</dl>
</div>
<dl class="Bl-tag">
<dt></dt>
<dd>
<p class="Pp">If --delegation is provided several times, the last set value
is used.</p>
<p class="Pp">Example:</p>
<pre>curl --delegation "none" https://example.com</pre>
<p class="Pp">See also <i>-k, --insecure</i> and <i>--ssl</i>.</p>
</dd>
<dt id="digest"><a class="permalink" href="#digest">--digest</a></dt>
<dd>(HTTP) Enables HTTP Digest authentication. This authentication scheme
avoids sending the password over the wire in clear text. Use this in
combination with the normal <i>-u, --user</i> option to set username and
password.
<p class="Pp">Providing --digest multiple times has no extra effect. Disable
it again with --no-digest.</p>
<p class="Pp">Example:</p>
<pre>curl -u name:password --digest https://example.com</pre>
<p class="Pp">This option is mutually exclusive with <i>--basic</i>,
<i>--ntlm</i> and <i>--negotiate</i>. See also <i>-u, --user</i>,
<i>--proxy-digest</i> and <i>--anyauth</i>.</p>
</dd>
<dt id="q,"><a class="permalink" href="#q,">-q, --disable</a></dt>
<dd>If used as the <b>first</b> parameter on the command line, the
<i>curlrc</i> config file is not read or used. See the <i>-K, --config</i>
for details on the default config file search path.
<p class="Pp">Providing --disable multiple times has no extra effect.
Disable it again with --no-disable.</p>
<p class="Pp">Example:</p>
<pre>curl -q https://example.com</pre>
<p class="Pp">See also <i>-K, --config</i>.</p>
</dd>
<dt id="disable"><a class="permalink" href="#disable">--disable-eprt</a></dt>
<dd>(FTP) Disable the use of the EPRT and LPRT commands when doing active FTP
transfers. Curl normally first attempts to use EPRT before using PORT, but
with this option, it uses PORT right away. EPRT is an extension to the
original FTP protocol, and does not work on all servers, but enables more
functionality in a better way than the traditional PORT command.
<p class="Pp"><i>--eprt</i> can be used to explicitly enable EPRT again and
<i>--no-eprt</i> is an alias for <i>--disable-eprt</i>.</p>
<p class="Pp">If the server is accessed using IPv6, this option has no
effect as EPRT is necessary then.</p>
<p class="Pp">Disabling EPRT only changes the active behavior. If you want
to switch to passive mode you need to not use <i>-P, --ftp-port</i> or
force it with <i>--ftp-pasv</i>.</p>
<p class="Pp">Providing --disable-eprt multiple times has no extra effect.
Disable it again with --no-disable-eprt.</p>