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