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