xref: /curl/docs/libcurl/curl_easy_setopt.md (revision b77d627d)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: curl_easy_setopt
5Section: 3
6Source: libcurl
7See-also:
8  - curl_easy_cleanup (3)
9  - curl_easy_getinfo (3)
10  - curl_easy_init (3)
11  - curl_easy_option_by_id (3)
12  - curl_easy_option_by_name (3)
13  - curl_easy_option_next (3)
14  - curl_easy_reset (3)
15  - curl_multi_setopt (3)
16Protocol:
17  - All
18---
19
20# NAME
21
22curl_easy_setopt - set options for a curl easy handle
23
24# SYNOPSIS
25
26~~~c
27#include <curl/curl.h>
28
29CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
30~~~
31
32# DESCRIPTION
33
34curl_easy_setopt(3) is used to tell libcurl how to behave. By setting the
35appropriate options, the application can change libcurl's behavior. All
36options are set with an *option* followed by a *parameter*. That parameter can
37be a **long**, a **function pointer**, an **object pointer** or a
38**curl_off_t**, depending on what the specific option expects. Read this
39manual carefully as bad input values may cause libcurl to behave badly! You
40can only set one option in each function call. A typical application uses many
41curl_easy_setopt(3) calls in the setup phase.
42
43Options set with this function call are valid for all forthcoming transfers
44performed using this *handle*. The options are not in any way reset between
45transfers, so if you want subsequent transfers with different options, you
46must change them between the transfers. You can optionally reset all options
47back to internal default with curl_easy_reset(3).
48
49Strings passed to libcurl as 'char *' arguments, are copied by the library;
50the string storage associated to the pointer argument may be discarded or
51reused after curl_easy_setopt(3) returns. The only exception to this rule is
52really CURLOPT_POSTFIELDS(3), but the alternative that copies the string
53CURLOPT_COPYPOSTFIELDS(3) has some usage characteristics you need to read up
54on. This function does not accept input strings longer than
55**CURL_MAX_INPUT_LENGTH** (8 MB).
56
57The order in which the options are set does not matter.
58
59Before version 7.17.0, strings were not copied. Instead the user was forced
60keep them available until libcurl no longer needed them.
61
62The *handle* is the return code from a curl_easy_init(3) or
63curl_easy_duphandle(3) call.
64
65# BEHAVIOR OPTIONS
66
67## CURLOPT_VERBOSE
68
69Display verbose information. See CURLOPT_VERBOSE(3)
70
71## CURLOPT_HEADER
72
73Include the header in the body output. See CURLOPT_HEADER(3)
74
75## CURLOPT_NOPROGRESS
76
77Shut off the progress meter. See CURLOPT_NOPROGRESS(3)
78
79## CURLOPT_NOSIGNAL
80
81Do not install signal handlers. See CURLOPT_NOSIGNAL(3)
82
83## CURLOPT_WILDCARDMATCH
84
85Transfer multiple files according to a filename pattern. See
86CURLOPT_WILDCARDMATCH(3)
87
88# CALLBACK OPTIONS
89
90## CURLOPT_WRITEFUNCTION
91
92Callback for writing data. See CURLOPT_WRITEFUNCTION(3)
93
94## CURLOPT_WRITEDATA
95
96Data pointer to pass to the write callback. See CURLOPT_WRITEDATA(3)
97
98## CURLOPT_READFUNCTION
99
100Callback for reading data. See CURLOPT_READFUNCTION(3)
101
102## CURLOPT_READDATA
103
104Data pointer to pass to the read callback. See CURLOPT_READDATA(3)
105
106## CURLOPT_IOCTLFUNCTION
107
108**Deprecated option** Callback for I/O operations.
109See CURLOPT_IOCTLFUNCTION(3)
110
111## CURLOPT_IOCTLDATA
112
113**Deprecated option** Data pointer to pass to the I/O callback.
114See CURLOPT_IOCTLDATA(3)
115
116## CURLOPT_SEEKFUNCTION
117
118Callback for seek operations. See CURLOPT_SEEKFUNCTION(3)
119
120## CURLOPT_SEEKDATA
121
122Data pointer to pass to the seek callback. See CURLOPT_SEEKDATA(3)
123
124## CURLOPT_SOCKOPTFUNCTION
125
126Callback for sockopt operations. See CURLOPT_SOCKOPTFUNCTION(3)
127
128## CURLOPT_SOCKOPTDATA
129
130Data pointer to pass to the sockopt callback. See CURLOPT_SOCKOPTDATA(3)
131
132## CURLOPT_OPENSOCKETFUNCTION
133
134Callback for socket creation. See CURLOPT_OPENSOCKETFUNCTION(3)
135
136## CURLOPT_OPENSOCKETDATA
137
138Data pointer to pass to the open socket callback. See CURLOPT_OPENSOCKETDATA(3)
139
140## CURLOPT_CLOSESOCKETFUNCTION
141
142Callback for closing socket. See CURLOPT_CLOSESOCKETFUNCTION(3)
143
144## CURLOPT_CLOSESOCKETDATA
145
146Data pointer to pass to the close socket callback. See CURLOPT_CLOSESOCKETDATA(3)
147
148## CURLOPT_PROGRESSFUNCTION
149
150**OBSOLETE** callback for progress meter.
151See CURLOPT_PROGRESSFUNCTION(3)
152
153## CURLOPT_PROGRESSDATA
154
155Data pointer to pass to the progress meter callback. See CURLOPT_PROGRESSDATA(3)
156
157## CURLOPT_XFERINFOFUNCTION
158
159Callback for progress meter. See CURLOPT_XFERINFOFUNCTION(3)
160
161## CURLOPT_XFERINFODATA
162
163Data pointer to pass to the progress meter callback. See CURLOPT_XFERINFODATA(3)
164
165## CURLOPT_HEADERFUNCTION
166
167Callback for writing received headers. See CURLOPT_HEADERFUNCTION(3)
168
169## CURLOPT_HEADERDATA
170
171Data pointer to pass to the header callback. See CURLOPT_HEADERDATA(3)
172
173## CURLOPT_DEBUGFUNCTION
174
175Callback for debug information. See CURLOPT_DEBUGFUNCTION(3)
176
177## CURLOPT_DEBUGDATA
178
179Data pointer to pass to the debug callback. See CURLOPT_DEBUGDATA(3)
180
181## CURLOPT_SSL_CTX_FUNCTION
182
183Callback for SSL context logic. See CURLOPT_SSL_CTX_FUNCTION(3)
184
185## CURLOPT_SSL_CTX_DATA
186
187Data pointer to pass to the SSL context callback. See CURLOPT_SSL_CTX_DATA(3)
188
189## CURLOPT_CONV_TO_NETWORK_FUNCTION
190
191**OBSOLETE** Callback for code base conversion.
192See CURLOPT_CONV_TO_NETWORK_FUNCTION(3)
193
194## CURLOPT_CONV_FROM_NETWORK_FUNCTION
195
196**OBSOLETE** Callback for code base conversion.
197See CURLOPT_CONV_FROM_NETWORK_FUNCTION(3)
198
199## CURLOPT_CONV_FROM_UTF8_FUNCTION
200
201**OBSOLETE** Callback for code base conversion.
202See CURLOPT_CONV_FROM_UTF8_FUNCTION(3)
203
204## CURLOPT_INTERLEAVEFUNCTION
205
206Callback for RTSP interleaved data. See CURLOPT_INTERLEAVEFUNCTION(3)
207
208## CURLOPT_INTERLEAVEDATA
209
210Data pointer to pass to the RTSP interleave callback. See CURLOPT_INTERLEAVEDATA(3)
211
212## CURLOPT_CHUNK_BGN_FUNCTION
213
214Callback for wildcard download start of chunk. See CURLOPT_CHUNK_BGN_FUNCTION(3)
215
216## CURLOPT_CHUNK_END_FUNCTION
217
218Callback for wildcard download end of chunk. See CURLOPT_CHUNK_END_FUNCTION(3)
219
220## CURLOPT_CHUNK_DATA
221
222Data pointer to pass to the chunk callbacks. See CURLOPT_CHUNK_DATA(3)
223
224## CURLOPT_FNMATCH_FUNCTION
225
226Callback for wildcard matching. See CURLOPT_FNMATCH_FUNCTION(3)
227
228## CURLOPT_FNMATCH_DATA
229
230Data pointer to pass to the wildcard matching callback. See CURLOPT_FNMATCH_DATA(3)
231
232## CURLOPT_SUPPRESS_CONNECT_HEADERS
233
234Suppress proxy CONNECT response headers from user callbacks. See
235CURLOPT_SUPPRESS_CONNECT_HEADERS(3)
236
237## CURLOPT_RESOLVER_START_FUNCTION
238
239Callback to be called before a new resolve request is started. See
240CURLOPT_RESOLVER_START_FUNCTION(3)
241
242## CURLOPT_RESOLVER_START_DATA
243
244Data pointer to pass to resolver start callback. See CURLOPT_RESOLVER_START_DATA(3)
245
246## CURLOPT_PREREQFUNCTION
247
248Callback to be called after a connection is established but before a request
249is made on that connection. See CURLOPT_PREREQFUNCTION(3)
250
251## CURLOPT_PREREQDATA
252
253Data pointer to pass to the CURLOPT_PREREQFUNCTION callback. See
254CURLOPT_PREREQDATA(3)
255
256# ERROR OPTIONS
257
258## CURLOPT_ERRORBUFFER
259
260Error message buffer. See CURLOPT_ERRORBUFFER(3)
261
262## CURLOPT_STDERR
263
264stderr replacement stream. See CURLOPT_STDERR(3)
265
266## CURLOPT_FAILONERROR
267
268Fail on HTTP 4xx errors. CURLOPT_FAILONERROR(3)
269
270## CURLOPT_KEEP_SENDING_ON_ERROR
271
272Keep sending on HTTP \>= 300 errors. CURLOPT_KEEP_SENDING_ON_ERROR(3)
273
274# NETWORK OPTIONS
275
276## CURLOPT_URL
277
278URL to work on. See CURLOPT_URL(3)
279
280## CURLOPT_PATH_AS_IS
281
282Disable squashing /../ and /./ sequences in the path. See CURLOPT_PATH_AS_IS(3)
283
284## CURLOPT_PROTOCOLS
285
286**Deprecated option** Allowed protocols. See CURLOPT_PROTOCOLS(3)
287
288## CURLOPT_PROTOCOLS_STR
289
290Allowed protocols. See CURLOPT_PROTOCOLS_STR(3)
291
292## CURLOPT_REDIR_PROTOCOLS
293
294**Deprecated option** Protocols to allow redirects to. See
295CURLOPT_REDIR_PROTOCOLS(3)
296
297## CURLOPT_REDIR_PROTOCOLS_STR
298
299Protocols to allow redirects to. See CURLOPT_REDIR_PROTOCOLS_STR(3)
300
301## CURLOPT_DEFAULT_PROTOCOL
302
303Default protocol. See CURLOPT_DEFAULT_PROTOCOL(3)
304
305## CURLOPT_PROXY
306
307Proxy to use. See CURLOPT_PROXY(3)
308
309## CURLOPT_PRE_PROXY
310
311Socks proxy to use. See CURLOPT_PRE_PROXY(3)
312
313## CURLOPT_PROXYPORT
314
315Proxy port to use. See CURLOPT_PROXYPORT(3)
316
317## CURLOPT_PROXYTYPE
318
319Proxy type. See CURLOPT_PROXYTYPE(3)
320
321## CURLOPT_NOPROXY
322
323Filter out hosts from proxy use. CURLOPT_NOPROXY(3)
324
325## CURLOPT_HTTPPROXYTUNNEL
326
327Tunnel through the HTTP proxy. CURLOPT_HTTPPROXYTUNNEL(3)
328
329## CURLOPT_CONNECT_TO
330
331Connect to a specific host and port. See CURLOPT_CONNECT_TO(3)
332
333## CURLOPT_SOCKS5_AUTH
334
335Socks5 authentication methods. See CURLOPT_SOCKS5_AUTH(3)
336
337## CURLOPT_SOCKS5_GSSAPI_SERVICE
338
339**Deprecated option** Socks5 GSSAPI service name.
340See CURLOPT_SOCKS5_GSSAPI_SERVICE(3)
341
342## CURLOPT_SOCKS5_GSSAPI_NEC
343
344Socks5 GSSAPI NEC mode. See CURLOPT_SOCKS5_GSSAPI_NEC(3)
345
346## CURLOPT_PROXY_SERVICE_NAME
347
348Proxy authentication service name. CURLOPT_PROXY_SERVICE_NAME(3)
349
350## CURLOPT_HAPROXYPROTOCOL
351
352Send an HAProxy PROXY protocol v1 header. See CURLOPT_HAPROXYPROTOCOL(3)
353
354## CURLOPT_HAPROXY_CLIENT_IP
355
356Spoof the client IP in an HAProxy PROXY protocol v1 header. See
357CURLOPT_HAPROXY_CLIENT_IP(3)
358
359## CURLOPT_SERVICE_NAME
360
361Authentication service name. CURLOPT_SERVICE_NAME(3)
362
363## CURLOPT_INTERFACE
364
365Bind connection locally to this. See CURLOPT_INTERFACE(3)
366
367## CURLOPT_LOCALPORT
368
369Bind connection locally to this port. See CURLOPT_LOCALPORT(3)
370
371## CURLOPT_LOCALPORTRANGE
372
373Bind connection locally to port range. See CURLOPT_LOCALPORTRANGE(3)
374
375## CURLOPT_DNS_CACHE_TIMEOUT
376
377Timeout for DNS cache. See CURLOPT_DNS_CACHE_TIMEOUT(3)
378
379## CURLOPT_DNS_USE_GLOBAL_CACHE
380
381**OBSOLETE** Enable global DNS cache.
382See CURLOPT_DNS_USE_GLOBAL_CACHE(3)
383
384## CURLOPT_DOH_URL
385
386Use this DoH server for name resolves. See CURLOPT_DOH_URL(3)
387
388## CURLOPT_BUFFERSIZE
389
390Ask for alternate buffer size. See CURLOPT_BUFFERSIZE(3)
391
392## CURLOPT_PORT
393
394Port number to connect to. See CURLOPT_PORT(3)
395
396## CURLOPT_TCP_FASTOPEN
397
398Enable TCP Fast Open. See CURLOPT_TCP_FASTOPEN(3)
399
400## CURLOPT_TCP_NODELAY
401
402Disable the Nagle algorithm. See CURLOPT_TCP_NODELAY(3)
403
404## CURLOPT_ADDRESS_SCOPE
405
406IPv6 scope for local addresses. See CURLOPT_ADDRESS_SCOPE(3)
407
408## CURLOPT_TCP_KEEPALIVE
409
410Enable TCP keep-alive. See CURLOPT_TCP_KEEPALIVE(3)
411
412## CURLOPT_TCP_KEEPIDLE
413
414Idle time before sending keep-alive. See CURLOPT_TCP_KEEPIDLE(3)
415
416## CURLOPT_TCP_KEEPINTVL
417
418Interval between keep-alive probes. See CURLOPT_TCP_KEEPINTVL(3)
419
420## CURLOPT_TCP_KEEPCNT
421
422Maximum number of keep-alive probes. See CURLOPT_TCP_KEEPCNT(3)
423
424## CURLOPT_UNIX_SOCKET_PATH
425
426Path to a Unix domain socket. See CURLOPT_UNIX_SOCKET_PATH(3)
427
428## CURLOPT_ABSTRACT_UNIX_SOCKET
429
430Path to an abstract Unix domain socket. See CURLOPT_ABSTRACT_UNIX_SOCKET(3)
431
432# NAMES and PASSWORDS OPTIONS (Authentication)
433
434## CURLOPT_NETRC
435
436Enable .netrc parsing. See CURLOPT_NETRC(3)
437
438## CURLOPT_NETRC_FILE
439
440.netrc filename. See CURLOPT_NETRC_FILE(3)
441
442## CURLOPT_USERPWD
443
444Username and password. See CURLOPT_USERPWD(3)
445
446## CURLOPT_PROXYUSERPWD
447
448Proxy username and password. See CURLOPT_PROXYUSERPWD(3)
449
450## CURLOPT_USERNAME
451
452Username. See CURLOPT_USERNAME(3)
453
454## CURLOPT_PASSWORD
455
456Password. See CURLOPT_PASSWORD(3)
457
458## CURLOPT_LOGIN_OPTIONS
459
460Login options. See CURLOPT_LOGIN_OPTIONS(3)
461
462## CURLOPT_PROXYUSERNAME
463
464Proxy username. See CURLOPT_PROXYUSERNAME(3)
465
466## CURLOPT_PROXYPASSWORD
467
468Proxy password. See CURLOPT_PROXYPASSWORD(3)
469
470## CURLOPT_HTTPAUTH
471
472HTTP server authentication methods. See CURLOPT_HTTPAUTH(3)
473
474## CURLOPT_TLSAUTH_USERNAME
475
476TLS authentication username. See CURLOPT_TLSAUTH_USERNAME(3)
477
478## CURLOPT_PROXY_TLSAUTH_USERNAME
479
480Proxy TLS authentication username. See CURLOPT_PROXY_TLSAUTH_USERNAME(3)
481
482## CURLOPT_TLSAUTH_PASSWORD
483
484TLS authentication password. See CURLOPT_TLSAUTH_PASSWORD(3)
485
486## CURLOPT_PROXY_TLSAUTH_PASSWORD
487
488Proxy TLS authentication password. See CURLOPT_PROXY_TLSAUTH_PASSWORD(3)
489
490## CURLOPT_TLSAUTH_TYPE
491
492TLS authentication methods. See CURLOPT_TLSAUTH_TYPE(3)
493
494## CURLOPT_PROXY_TLSAUTH_TYPE
495
496Proxy TLS authentication methods. See CURLOPT_PROXY_TLSAUTH_TYPE(3)
497
498## CURLOPT_PROXYAUTH
499
500HTTP proxy authentication methods. See CURLOPT_PROXYAUTH(3)
501
502## CURLOPT_SASL_AUTHZID
503
504SASL authorization identity (identity to act as). See CURLOPT_SASL_AUTHZID(3)
505
506## CURLOPT_SASL_IR
507
508Enable SASL initial response. See CURLOPT_SASL_IR(3)
509
510## CURLOPT_XOAUTH2_BEARER
511
512OAuth2 bearer token. See CURLOPT_XOAUTH2_BEARER(3)
513
514## CURLOPT_DISALLOW_USERNAME_IN_URL
515
516Do not allow username in URL. See CURLOPT_DISALLOW_USERNAME_IN_URL(3)
517
518# HTTP OPTIONS
519
520## CURLOPT_AUTOREFERER
521
522Automatically set Referer: header. See CURLOPT_AUTOREFERER(3)
523
524## CURLOPT_ACCEPT_ENCODING
525
526Accept-Encoding and automatic decompressing data. See CURLOPT_ACCEPT_ENCODING(3)
527
528## CURLOPT_TRANSFER_ENCODING
529
530Request Transfer-Encoding. See CURLOPT_TRANSFER_ENCODING(3)
531
532## CURLOPT_FOLLOWLOCATION
533
534Follow HTTP redirects. See CURLOPT_FOLLOWLOCATION(3)
535
536## CURLOPT_UNRESTRICTED_AUTH
537
538Do not restrict authentication to original host. CURLOPT_UNRESTRICTED_AUTH(3)
539
540## CURLOPT_MAXREDIRS
541
542Maximum number of redirects to follow. See CURLOPT_MAXREDIRS(3)
543
544## CURLOPT_POSTREDIR
545
546How to act on redirects after POST. See CURLOPT_POSTREDIR(3)
547
548## CURLOPT_PUT
549
550**Deprecated option** Issue an HTTP PUT request. See CURLOPT_PUT(3)
551
552## CURLOPT_POST
553
554Issue an HTTP POST request. See CURLOPT_POST(3)
555
556## CURLOPT_POSTFIELDS
557
558Send a POST with this data. See CURLOPT_POSTFIELDS(3)
559
560## CURLOPT_POSTFIELDSIZE
561
562The POST data is this big. See CURLOPT_POSTFIELDSIZE(3)
563
564## CURLOPT_POSTFIELDSIZE_LARGE
565
566The POST data is this big. See CURLOPT_POSTFIELDSIZE_LARGE(3)
567
568## CURLOPT_COPYPOSTFIELDS
569
570Send a POST with this data - and copy it. See CURLOPT_COPYPOSTFIELDS(3)
571
572## CURLOPT_HTTPPOST
573
574**Deprecated option** Multipart formpost HTTP POST.
575See CURLOPT_HTTPPOST(3)
576
577## CURLOPT_REFERER
578
579Referer: header. See CURLOPT_REFERER(3)
580
581## CURLOPT_USERAGENT
582
583User-Agent: header. See CURLOPT_USERAGENT(3)
584
585## CURLOPT_HTTPHEADER
586
587Custom HTTP headers. See CURLOPT_HTTPHEADER(3)
588
589## CURLOPT_HEADEROPT
590
591Control custom headers. See CURLOPT_HEADEROPT(3)
592
593## CURLOPT_PROXYHEADER
594
595Custom HTTP headers sent to proxy. See CURLOPT_PROXYHEADER(3)
596
597## CURLOPT_HTTP200ALIASES
598
599Alternative versions of 200 OK. See CURLOPT_HTTP200ALIASES(3)
600
601## CURLOPT_COOKIE
602
603Cookie(s) to send. See CURLOPT_COOKIE(3)
604
605## CURLOPT_COOKIEFILE
606
607File to read cookies from. See CURLOPT_COOKIEFILE(3)
608
609## CURLOPT_COOKIEJAR
610
611File to write cookies to. See CURLOPT_COOKIEJAR(3)
612
613## CURLOPT_COOKIESESSION
614
615Start a new cookie session. See CURLOPT_COOKIESESSION(3)
616
617## CURLOPT_COOKIELIST
618
619Add or control cookies. See CURLOPT_COOKIELIST(3)
620
621## CURLOPT_ALTSVC
622
623Specify the Alt-Svc: cache filename. See CURLOPT_ALTSVC(3)
624
625## CURLOPT_ALTSVC_CTRL
626
627Enable and configure Alt-Svc: treatment. See CURLOPT_ALTSVC_CTRL(3)
628
629## CURLOPT_HSTS
630
631Set HSTS cache file. See CURLOPT_HSTS(3)
632
633## CURLOPT_HSTS_CTRL
634
635Enable HSTS. See CURLOPT_HSTS_CTRL(3)
636
637## CURLOPT_HSTSREADFUNCTION
638
639Set HSTS read callback. See CURLOPT_HSTSREADFUNCTION(3)
640
641## CURLOPT_HSTSREADDATA
642
643Pass pointer to the HSTS read callback. See CURLOPT_HSTSREADDATA(3)
644
645## CURLOPT_HSTSWRITEFUNCTION
646
647Set HSTS write callback. See CURLOPT_HSTSWRITEFUNCTION(3)
648
649## CURLOPT_HSTSWRITEDATA
650
651Pass pointer to the HSTS write callback. See CURLOPT_HSTSWRITEDATA(3)
652
653## CURLOPT_HTTPGET
654
655Do an HTTP GET request. See CURLOPT_HTTPGET(3)
656
657## CURLOPT_REQUEST_TARGET
658
659Set the request target. CURLOPT_REQUEST_TARGET(3)
660
661## CURLOPT_HTTP_VERSION
662
663HTTP version to use. CURLOPT_HTTP_VERSION(3)
664
665## CURLOPT_HTTP09_ALLOWED
666
667Allow HTTP/0.9 responses. CURLOPT_HTTP09_ALLOWED(3)
668
669## CURLOPT_IGNORE_CONTENT_LENGTH
670
671Ignore Content-Length. See CURLOPT_IGNORE_CONTENT_LENGTH(3)
672
673## CURLOPT_HTTP_CONTENT_DECODING
674
675Disable Content decoding. See CURLOPT_HTTP_CONTENT_DECODING(3)
676
677## CURLOPT_HTTP_TRANSFER_DECODING
678
679Disable Transfer decoding. See CURLOPT_HTTP_TRANSFER_DECODING(3)
680
681## CURLOPT_EXPECT_100_TIMEOUT_MS
682
683100-continue timeout. See CURLOPT_EXPECT_100_TIMEOUT_MS(3)
684
685## CURLOPT_TRAILERFUNCTION
686
687Set callback for sending trailing headers. See
688CURLOPT_TRAILERFUNCTION(3)
689
690## CURLOPT_TRAILERDATA
691
692Custom pointer passed to the trailing headers callback. See
693CURLOPT_TRAILERDATA(3)
694
695## CURLOPT_PIPEWAIT
696
697Wait on connection to pipeline on it. See CURLOPT_PIPEWAIT(3)
698
699## CURLOPT_STREAM_DEPENDS
700
701This HTTP/2 stream depends on another. See CURLOPT_STREAM_DEPENDS(3)
702
703## CURLOPT_STREAM_DEPENDS_E
704
705This HTTP/2 stream depends on another exclusively. See
706CURLOPT_STREAM_DEPENDS_E(3)
707
708## CURLOPT_STREAM_WEIGHT
709
710Set this HTTP/2 stream's weight. See CURLOPT_STREAM_WEIGHT(3)
711
712# SMTP OPTIONS
713
714## CURLOPT_MAIL_FROM
715
716Address of the sender. See CURLOPT_MAIL_FROM(3)
717
718## CURLOPT_MAIL_RCPT
719
720Address of the recipients. See CURLOPT_MAIL_RCPT(3)
721
722## CURLOPT_MAIL_AUTH
723
724Authentication address. See CURLOPT_MAIL_AUTH(3)
725
726## CURLOPT_MAIL_RCPT_ALLOWFAILS
727
728Allow RCPT TO command to fail for some recipients. See
729CURLOPT_MAIL_RCPT_ALLOWFAILS(3)
730
731# TFTP OPTIONS
732
733## CURLOPT_TFTP_BLKSIZE
734
735TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
736
737## CURLOPT_TFTP_NO_OPTIONS
738
739Do not send TFTP options requests. See CURLOPT_TFTP_NO_OPTIONS(3)
740
741# FTP OPTIONS
742
743## CURLOPT_FTPPORT
744
745Use active FTP. See CURLOPT_FTPPORT(3)
746
747## CURLOPT_QUOTE
748
749Commands to run before transfer. See CURLOPT_QUOTE(3)
750
751## CURLOPT_POSTQUOTE
752
753Commands to run after transfer. See CURLOPT_POSTQUOTE(3)
754
755## CURLOPT_PREQUOTE
756
757Commands to run just before transfer. See CURLOPT_PREQUOTE(3)
758
759## CURLOPT_APPEND
760
761Append to remote file. See CURLOPT_APPEND(3)
762
763## CURLOPT_FTP_USE_EPRT
764
765Use EPRT. See CURLOPT_FTP_USE_EPRT(3)
766
767## CURLOPT_FTP_USE_EPSV
768
769Use EPSV. See CURLOPT_FTP_USE_EPSV(3)
770
771## CURLOPT_FTP_USE_PRET
772
773Use PRET. See CURLOPT_FTP_USE_PRET(3)
774
775## CURLOPT_FTP_CREATE_MISSING_DIRS
776
777Create missing directories on the remote server. See CURLOPT_FTP_CREATE_MISSING_DIRS(3)
778
779## CURLOPT_SERVER_RESPONSE_TIMEOUT
780
781Timeout for server responses. See CURLOPT_SERVER_RESPONSE_TIMEOUT(3)
782
783## CURLOPT_SERVER_RESPONSE_TIMEOUT_MS
784
785Timeout for server responses. See CURLOPT_SERVER_RESPONSE_TIMEOUT_MS(3)
786
787## CURLOPT_FTP_ALTERNATIVE_TO_USER
788
789Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
790
791## CURLOPT_FTP_SKIP_PASV_IP
792
793Ignore the IP address in the PASV response. See CURLOPT_FTP_SKIP_PASV_IP(3)
794
795## CURLOPT_FTPSSLAUTH
796
797Control how to do TLS. See CURLOPT_FTPSSLAUTH(3)
798
799## CURLOPT_FTP_SSL_CCC
800
801Back to non-TLS again after authentication. See CURLOPT_FTP_SSL_CCC(3)
802
803## CURLOPT_FTP_ACCOUNT
804
805Send ACCT command. See CURLOPT_FTP_ACCOUNT(3)
806
807## CURLOPT_FTP_FILEMETHOD
808
809Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3)
810
811# RTSP OPTIONS
812
813## CURLOPT_RTSP_REQUEST
814
815RTSP request. See CURLOPT_RTSP_REQUEST(3)
816
817## CURLOPT_RTSP_SESSION_ID
818
819RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
820
821## CURLOPT_RTSP_STREAM_URI
822
823RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
824
825## CURLOPT_RTSP_TRANSPORT
826
827RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
828
829## CURLOPT_RTSP_CLIENT_CSEQ
830
831Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
832
833## CURLOPT_RTSP_SERVER_CSEQ
834
835CSEQ number for RTSP Server-\>Client request. See CURLOPT_RTSP_SERVER_CSEQ(3)
836
837## CURLOPT_AWS_SIGV4
838
839AWS HTTP V4 Signature. See CURLOPT_AWS_SIGV4(3)
840
841# PROTOCOL OPTIONS
842
843## CURLOPT_TRANSFERTEXT
844
845Use text transfer. See CURLOPT_TRANSFERTEXT(3)
846
847## CURLOPT_PROXY_TRANSFER_MODE
848
849Add transfer mode to URL over proxy. See CURLOPT_PROXY_TRANSFER_MODE(3)
850
851## CURLOPT_CRLF
852
853Convert newlines. See CURLOPT_CRLF(3)
854
855## CURLOPT_RANGE
856
857Range requests. See CURLOPT_RANGE(3)
858
859## CURLOPT_RESUME_FROM
860
861Resume a transfer. See CURLOPT_RESUME_FROM(3)
862
863## CURLOPT_RESUME_FROM_LARGE
864
865Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3)
866
867## CURLOPT_CURLU
868
869Set URL to work on with a URL handle. See CURLOPT_CURLU(3)
870
871## CURLOPT_CUSTOMREQUEST
872
873Custom request/method. See CURLOPT_CUSTOMREQUEST(3)
874
875## CURLOPT_FILETIME
876
877Request file modification date and time. See CURLOPT_FILETIME(3)
878
879## CURLOPT_DIRLISTONLY
880
881List only. See CURLOPT_DIRLISTONLY(3)
882
883## CURLOPT_NOBODY
884
885Do not get the body contents. See CURLOPT_NOBODY(3)
886
887## CURLOPT_INFILESIZE
888
889Size of file to send. CURLOPT_INFILESIZE(3)
890
891## CURLOPT_INFILESIZE_LARGE
892
893Size of file to send. CURLOPT_INFILESIZE_LARGE(3)
894
895## CURLOPT_UPLOAD
896
897Upload data. See CURLOPT_UPLOAD(3)
898
899## CURLOPT_UPLOAD_BUFFERSIZE
900
901Set upload buffer size. See CURLOPT_UPLOAD_BUFFERSIZE(3)
902
903## CURLOPT_MIMEPOST
904
905Post/send MIME data. See CURLOPT_MIMEPOST(3)
906
907## CURLOPT_MIME_OPTIONS
908
909Set MIME option flags. See CURLOPT_MIME_OPTIONS(3)
910
911## CURLOPT_MAXFILESIZE
912
913Maximum file size to get. See CURLOPT_MAXFILESIZE(3)
914
915## CURLOPT_MAXFILESIZE_LARGE
916
917Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3)
918
919## CURLOPT_TIMECONDITION
920
921Make a time conditional request. See CURLOPT_TIMECONDITION(3)
922
923## CURLOPT_TIMEVALUE
924
925Time value for the time conditional request. See CURLOPT_TIMEVALUE(3)
926
927## CURLOPT_TIMEVALUE_LARGE
928
929Time value for the time conditional request. See CURLOPT_TIMEVALUE_LARGE(3)
930
931# CONNECTION OPTIONS
932
933## CURLOPT_TIMEOUT
934
935Timeout for the entire request. See CURLOPT_TIMEOUT(3)
936
937## CURLOPT_TIMEOUT_MS
938
939Millisecond timeout for the entire request. See CURLOPT_TIMEOUT_MS(3)
940
941## CURLOPT_LOW_SPEED_LIMIT
942
943Low speed limit to abort transfer. See CURLOPT_LOW_SPEED_LIMIT(3)
944
945## CURLOPT_LOW_SPEED_TIME
946
947Time to be below the speed to trigger low speed abort. See CURLOPT_LOW_SPEED_TIME(3)
948
949## CURLOPT_MAX_SEND_SPEED_LARGE
950
951Cap the upload speed to this. See CURLOPT_MAX_SEND_SPEED_LARGE(3)
952
953## CURLOPT_MAX_RECV_SPEED_LARGE
954
955Cap the download speed to this. See CURLOPT_MAX_RECV_SPEED_LARGE(3)
956
957## CURLOPT_MAXCONNECTS
958
959Maximum number of connections in the connection pool. See CURLOPT_MAXCONNECTS(3)
960
961## CURLOPT_FRESH_CONNECT
962
963Use a new connection. CURLOPT_FRESH_CONNECT(3)
964
965## CURLOPT_FORBID_REUSE
966
967Prevent subsequent connections from reusing this. See CURLOPT_FORBID_REUSE(3)
968
969## CURLOPT_MAXAGE_CONN
970
971Limit the age (idle time) of connections for reuse. See CURLOPT_MAXAGE_CONN(3)
972
973## CURLOPT_MAXLIFETIME_CONN
974
975Limit the age (since creation) of connections for reuse. See
976CURLOPT_MAXLIFETIME_CONN(3)
977
978## CURLOPT_CONNECTTIMEOUT
979
980Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3)
981
982## CURLOPT_CONNECTTIMEOUT_MS
983
984Millisecond timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT_MS(3)
985
986## CURLOPT_IPRESOLVE
987
988IP version to use. See CURLOPT_IPRESOLVE(3)
989
990## CURLOPT_CONNECT_ONLY
991
992Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3)
993
994## CURLOPT_USE_SSL
995
996Use TLS/SSL. See CURLOPT_USE_SSL(3)
997
998## CURLOPT_RESOLVE
999
1000Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3)
1001
1002## CURLOPT_DNS_INTERFACE
1003
1004Bind name resolves to this interface. See CURLOPT_DNS_INTERFACE(3)
1005
1006## CURLOPT_DNS_LOCAL_IP4
1007
1008Bind name resolves to this IP4 address. See CURLOPT_DNS_LOCAL_IP4(3)
1009
1010## CURLOPT_DNS_LOCAL_IP6
1011
1012Bind name resolves to this IP6 address. See CURLOPT_DNS_LOCAL_IP6(3)
1013
1014## CURLOPT_DNS_SERVERS
1015
1016Preferred DNS servers. See CURLOPT_DNS_SERVERS(3)
1017
1018## CURLOPT_DNS_SHUFFLE_ADDRESSES
1019
1020Shuffle addresses before use. See CURLOPT_DNS_SHUFFLE_ADDRESSES(3)
1021
1022## CURLOPT_ACCEPTTIMEOUT_MS
1023
1024Timeout for waiting for the server's connect back to be accepted. See
1025CURLOPT_ACCEPTTIMEOUT_MS(3)
1026
1027## CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
1028
1029Timeout for happy eyeballs. See CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS(3)
1030
1031## CURLOPT_UPKEEP_INTERVAL_MS
1032
1033Sets the interval at which connection upkeep are performed. See
1034CURLOPT_UPKEEP_INTERVAL_MS(3)
1035
1036# SSL and SECURITY OPTIONS
1037
1038## CURLOPT_SSLCERT
1039
1040Client cert. See CURLOPT_SSLCERT(3)
1041
1042## CURLOPT_SSLCERT_BLOB
1043
1044Client cert memory buffer. See CURLOPT_SSLCERT_BLOB(3)
1045
1046## CURLOPT_PROXY_SSLCERT
1047
1048Proxy client cert. See CURLOPT_PROXY_SSLCERT(3)
1049
1050## CURLOPT_PROXY_SSLCERT_BLOB
1051
1052Proxy client cert memory buffer. See CURLOPT_PROXY_SSLCERT_BLOB(3)
1053
1054## CURLOPT_SSLCERTTYPE
1055
1056Client cert type. See CURLOPT_SSLCERTTYPE(3)
1057
1058## CURLOPT_PROXY_SSLCERTTYPE
1059
1060Proxy client cert type. See CURLOPT_PROXY_SSLCERTTYPE(3)
1061
1062## CURLOPT_SSLKEY
1063
1064Client key. See CURLOPT_SSLKEY(3)
1065
1066## CURLOPT_SSLKEY_BLOB
1067
1068Client key memory buffer. See CURLOPT_SSLKEY_BLOB(3)
1069
1070## CURLOPT_PROXY_SSLKEY
1071
1072Proxy client key. See CURLOPT_PROXY_SSLKEY(3)
1073
1074## CURLOPT_PROXY_SSLKEY_BLOB
1075
1076Proxy client key. See CURLOPT_PROXY_SSLKEY_BLOB(3)
1077
1078## CURLOPT_SSLKEYTYPE
1079
1080Client key type. See CURLOPT_SSLKEYTYPE(3)
1081
1082## CURLOPT_PROXY_SSLKEYTYPE
1083
1084Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3)
1085
1086## CURLOPT_KEYPASSWD
1087
1088Client key password. See CURLOPT_KEYPASSWD(3)
1089
1090## CURLOPT_PROXY_KEYPASSWD
1091
1092Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3)
1093
1094## CURLOPT_SSL_EC_CURVES
1095
1096Set key exchange curves. See CURLOPT_SSL_EC_CURVES(3)
1097
1098## CURLOPT_SSL_ENABLE_ALPN
1099
1100Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3)
1101
1102## CURLOPT_SSL_ENABLE_NPN
1103
1104**OBSOLETE** Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3)
1105
1106## CURLOPT_SSLENGINE
1107
1108Use identifier with SSL engine. See CURLOPT_SSLENGINE(3)
1109
1110## CURLOPT_SSLENGINE_DEFAULT
1111
1112Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3)
1113
1114## CURLOPT_SSL_FALSESTART
1115
1116Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3)
1117
1118## CURLOPT_SSLVERSION
1119
1120SSL version to use. See CURLOPT_SSLVERSION(3)
1121
1122## CURLOPT_PROXY_SSLVERSION
1123
1124Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3)
1125
1126## CURLOPT_SSL_VERIFYHOST
1127
1128Verify the hostname in the SSL certificate. See CURLOPT_SSL_VERIFYHOST(3)
1129
1130## CURLOPT_DOH_SSL_VERIFYHOST
1131
1132Verify the hostname in the DoH (DNS-over-HTTPS) SSL certificate. See
1133CURLOPT_DOH_SSL_VERIFYHOST(3)
1134
1135## CURLOPT_PROXY_SSL_VERIFYHOST
1136
1137Verify the hostname in the proxy SSL certificate. See
1138CURLOPT_PROXY_SSL_VERIFYHOST(3)
1139
1140## CURLOPT_SSL_VERIFYPEER
1141
1142Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3)
1143
1144## CURLOPT_DOH_SSL_VERIFYPEER
1145
1146Verify the DoH (DNS-over-HTTPS) SSL certificate. See
1147CURLOPT_DOH_SSL_VERIFYPEER(3)
1148
1149## CURLOPT_PROXY_SSL_VERIFYPEER
1150
1151Verify the proxy SSL certificate. See CURLOPT_PROXY_SSL_VERIFYPEER(3)
1152
1153## CURLOPT_SSL_VERIFYSTATUS
1154
1155Verify the SSL certificate's status. See CURLOPT_SSL_VERIFYSTATUS(3)
1156
1157## CURLOPT_DOH_SSL_VERIFYSTATUS
1158
1159Verify the DoH (DNS-over-HTTPS) SSL certificate's status. See
1160CURLOPT_DOH_SSL_VERIFYSTATUS(3)
1161
1162## CURLOPT_CAINFO
1163
1164CA cert bundle. See CURLOPT_CAINFO(3)
1165
1166## CURLOPT_CAINFO_BLOB
1167
1168CA cert bundle memory buffer. See CURLOPT_CAINFO_BLOB(3)
1169
1170## CURLOPT_PROXY_CAINFO
1171
1172Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3)
1173
1174## CURLOPT_PROXY_CAINFO_BLOB
1175
1176Proxy CA cert bundle memory buffer. See CURLOPT_PROXY_CAINFO_BLOB(3)
1177
1178## CURLOPT_ISSUERCERT
1179
1180Issuer certificate. See CURLOPT_ISSUERCERT(3)
1181
1182## CURLOPT_ISSUERCERT_BLOB
1183
1184Issuer certificate memory buffer. See CURLOPT_ISSUERCERT_BLOB(3)
1185
1186## CURLOPT_PROXY_ISSUERCERT
1187
1188Proxy issuer certificate. See CURLOPT_PROXY_ISSUERCERT(3)
1189
1190## CURLOPT_PROXY_ISSUERCERT_BLOB
1191
1192Proxy issuer certificate memory buffer. See CURLOPT_PROXY_ISSUERCERT_BLOB(3)
1193
1194## CURLOPT_CAPATH
1195
1196Path to CA cert bundle. See CURLOPT_CAPATH(3)
1197
1198## CURLOPT_PROXY_CAPATH
1199
1200Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3)
1201
1202## CURLOPT_CRLFILE
1203
1204Certificate Revocation List. See CURLOPT_CRLFILE(3)
1205
1206## CURLOPT_PROXY_CRLFILE
1207
1208Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3)
1209
1210## CURLOPT_CA_CACHE_TIMEOUT
1211
1212Timeout for CA cache. See CURLOPT_CA_CACHE_TIMEOUT(3)
1213
1214## CURLOPT_CERTINFO
1215
1216Extract certificate info. See CURLOPT_CERTINFO(3)
1217
1218## CURLOPT_PINNEDPUBLICKEY
1219
1220Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3)
1221
1222## CURLOPT_PROXY_PINNEDPUBLICKEY
1223
1224Set the proxy's pinned SSL public key. See
1225CURLOPT_PROXY_PINNEDPUBLICKEY(3)
1226
1227## CURLOPT_RANDOM_FILE
1228
1229**OBSOLETE** Provide source for entropy random data.
1230See CURLOPT_RANDOM_FILE(3)
1231
1232## CURLOPT_EGDSOCKET
1233
1234**OBSOLETE** Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3)
1235
1236## CURLOPT_SSL_CIPHER_LIST
1237
1238Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3)
1239
1240## CURLOPT_PROXY_SSL_CIPHER_LIST
1241
1242Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3)
1243
1244## CURLOPT_TLS13_CIPHERS
1245
1246TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3)
1247
1248## CURLOPT_PROXY_TLS13_CIPHERS
1249
1250Proxy TLS 1.3 cipher suites to use. See CURLOPT_PROXY_TLS13_CIPHERS(3)
1251
1252## CURLOPT_SSL_SESSIONID_CACHE
1253
1254Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3)
1255
1256## CURLOPT_SSL_OPTIONS
1257
1258Control SSL behavior. See CURLOPT_SSL_OPTIONS(3)
1259
1260## CURLOPT_PROXY_SSL_OPTIONS
1261
1262Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3)
1263
1264## CURLOPT_KRBLEVEL
1265
1266Kerberos security level. See CURLOPT_KRBLEVEL(3)
1267
1268## CURLOPT_GSSAPI_DELEGATION
1269
1270Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3)
1271
1272# SSH OPTIONS
1273
1274## CURLOPT_SSH_AUTH_TYPES
1275
1276SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
1277
1278## CURLOPT_SSH_COMPRESSION
1279
1280Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
1281
1282## CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
1283
1284MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
1285
1286## CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256
1287
1288SHA256 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256(3)
1289
1290## CURLOPT_SSH_PUBLIC_KEYFILE
1291
1292Filename of the public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
1293
1294## CURLOPT_SSH_PRIVATE_KEYFILE
1295
1296Filename of the private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
1297
1298## CURLOPT_SSH_KNOWNHOSTS
1299
1300Filename with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
1301
1302## CURLOPT_SSH_KEYFUNCTION
1303
1304Callback for known hosts handling. See CURLOPT_SSH_KEYFUNCTION(3)
1305
1306## CURLOPT_SSH_KEYDATA
1307
1308Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEYDATA(3)
1309
1310## CURLOPT_SSH_HOSTKEYFUNCTION
1311
1312Callback for checking host key handling. See CURLOPT_SSH_HOSTKEYFUNCTION(3)
1313
1314## CURLOPT_SSH_HOSTKEYDATA
1315
1316Custom pointer to pass to ssh host key callback. See CURLOPT_SSH_HOSTKEYDATA(3)
1317
1318# WEBSOCKET
1319
1320## CURLOPT_WS_OPTIONS
1321
1322Set WebSocket options. See CURLOPT_WS_OPTIONS(3)
1323
1324# OTHER OPTIONS
1325
1326## CURLOPT_PRIVATE
1327
1328Private pointer to store. See CURLOPT_PRIVATE(3)
1329
1330## CURLOPT_SHARE
1331
1332Share object to use. See CURLOPT_SHARE(3)
1333
1334## CURLOPT_NEW_FILE_PERMS
1335
1336Mode for creating new remote files. See CURLOPT_NEW_FILE_PERMS(3)
1337
1338## CURLOPT_NEW_DIRECTORY_PERMS
1339
1340Mode for creating new remote directories. See CURLOPT_NEW_DIRECTORY_PERMS(3)
1341
1342## CURLOPT_QUICK_EXIT
1343
1344To be set by toplevel tools like "curl" to skip lengthy cleanups when they are
1345about to call exit() anyway. See CURLOPT_QUICK_EXIT(3)
1346
1347# TELNET OPTIONS
1348
1349## CURLOPT_TELNETOPTIONS
1350
1351TELNET options. See CURLOPT_TELNETOPTIONS(3)
1352
1353# EXAMPLE
1354
1355~~~c
1356int main(void)
1357{
1358  CURL *curl = curl_easy_init();
1359  if(curl) {
1360    CURLcode res;
1361    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
1362    res = curl_easy_perform(curl);
1363    curl_easy_cleanup(curl);
1364  }
1365}
1366~~~
1367
1368# ENCRYPTED CLIENT HELLO OPTIONS
1369
1370## CURLOPT_ECH
1371
1372Set the configuration for ECH. See CURLOPT_ECH(3)
1373
1374# AVAILABILITY
1375
1376Always
1377
1378# RETURN VALUE
1379
1380*CURLE_OK* (zero) means that the option was set properly, non-zero means an
1381error occurred as *\<curl/curl.h\>* defines. See the libcurl-errors(3) man
1382page for the full list with descriptions.
1383
1384Strings passed on to libcurl must be shorter than 8000000 bytes, otherwise
1385curl_easy_setopt(3) returns **CURLE_BAD_FUNCTION_ARGUMENT** (added in 7.65.0).
1386
1387**CURLE_BAD_FUNCTION_ARGUMENT** is returned when the argument to an option is
1388invalid, like perhaps out of range.
1389
1390If you try to set an option that libcurl does not know about, perhaps because
1391the library is too old to support it or the option was removed in a recent
1392version, this function returns *CURLE_UNKNOWN_OPTION*. If support for the
1393option was disabled at compile-time, it returns *CURLE_NOT_BUILT_IN*.
1394