1curl_easy_setopt(3)             libcurl Manual             curl_easy_setopt(3)
2
3
4

NAME

6       curl_easy_setopt - set options for a curl easy handle
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
12

DESCRIPTION

14       curl_easy_setopt(3)  is  used to tell libcurl how to behave. By setting
15       the appropriate options, the application can change libcurl's behavior.
16       All options are set with an option followed by a parameter. That param‐
17       eter can be a  long,  a  function  pointer,  an  object  pointer  or  a
18       curl_off_t,  depending  on  what the specific option expects. Read this
19       manual carefully as bad input values may cause libcurl to behave badly!
20       You  can  only set one option in each function call. A typical applica‐
21       tion uses many curl_easy_setopt(3) calls in the setup phase.
22
23       Options set with this function  call  are  valid  for  all  forthcoming
24       transfers  performed using this handle.  The options are not in any way
25       reset between transfers, so if you want subsequent transfers with  dif‐
26       ferent options, you must change them between the transfers. You can op‐
27       tionally reset all options back to internal default with  curl_easy_re‐
28       set(3).
29
30       Strings  passed to libcurl as 'char *' arguments, are copied by the li‐
31       brary; the string storage associated to the  pointer  argument  may  be
32       discarded  or reused after curl_easy_setopt(3) returns. The only excep‐
33       tion to this rule is really CURLOPT_POSTFIELDS(3), but the  alternative
34       that copies the string CURLOPT_COPYPOSTFIELDS(3) has some usage charac‐
35       teristics you need to read up on. This function does not  accept  input
36       strings longer than CURL_MAX_INPUT_LENGTH (8 MB).
37
38       The order in which the options are set does not matter.
39
40       Before  version  7.17.0,  strings were not copied. Instead the user was
41       forced keep them available until libcurl no longer needed them.
42
43       The  handle  is  the  return   code   from   a   curl_easy_init(3)   or
44       curl_easy_duphandle(3) call.
45

BEHAVIOR OPTIONS

47       CURLOPT_VERBOSE
48              Display verbose information. See CURLOPT_VERBOSE(3)
49
50       CURLOPT_HEADER
51              Include the header in the body output. See CURLOPT_HEADER(3)
52
53       CURLOPT_NOPROGRESS
54              Shut off the progress meter. See CURLOPT_NOPROGRESS(3)
55
56       CURLOPT_NOSIGNAL
57              Do not install signal handlers. See CURLOPT_NOSIGNAL(3)
58
59       CURLOPT_WILDCARDMATCH
60              Transfer  multiple  files  according to a file name pattern. See
61              CURLOPT_WILDCARDMATCH(3)
62

CALLBACK OPTIONS

64       CURLOPT_WRITEFUNCTION
65              Callback for writing data. See CURLOPT_WRITEFUNCTION(3)
66
67       CURLOPT_WRITEDATA
68              Data pointer to pass to the write callback.  See  CURLOPT_WRITE‐
69              DATA(3)
70
71       CURLOPT_READFUNCTION
72              Callback for reading data. See CURLOPT_READFUNCTION(3)
73
74       CURLOPT_READDATA
75              Data  pointer  to  pass  to the read callback. See CURLOPT_READ‐
76              DATA(3)
77
78       CURLOPT_IOCTLFUNCTION
79              Callback for I/O operations. See CURLOPT_IOCTLFUNCTION(3)
80
81       CURLOPT_IOCTLDATA
82              Data pointer to pass to the  I/O  callback.  See  CURLOPT_IOCTL‐
83              DATA(3)
84
85       CURLOPT_SEEKFUNCTION
86              Callback for seek operations. See CURLOPT_SEEKFUNCTION(3)
87
88       CURLOPT_SEEKDATA
89              Data  pointer  to  pass  to the seek callback. See CURLOPT_SEEK‐
90              DATA(3)
91
92       CURLOPT_SOCKOPTFUNCTION
93              Callback for sockopt operations. See CURLOPT_SOCKOPTFUNCTION(3)
94
95       CURLOPT_SOCKOPTDATA
96              Data pointer to pass to the sockopt callback. See  CURLOPT_SOCK‐
97              OPTDATA(3)
98
99       CURLOPT_OPENSOCKETFUNCTION
100              Callback for socket creation. See CURLOPT_OPENSOCKETFUNCTION(3)
101
102       CURLOPT_OPENSOCKETDATA
103              Data  pointer  to  pass  to  the  open socket callback. See CUR‐
104              LOPT_OPENSOCKETDATA(3)
105
106       CURLOPT_CLOSESOCKETFUNCTION
107              Callback for closing socket. See CURLOPT_CLOSESOCKETFUNCTION(3)
108
109       CURLOPT_CLOSESOCKETDATA
110              Data pointer to pass to the  close  socket  callback.  See  CUR‐
111              LOPT_CLOSESOCKETDATA(3)
112
113       CURLOPT_PROGRESSFUNCTION
114              OBSOLETE  callback for progress meter. See CURLOPT_PROGRESSFUNC‐
115              TION(3)
116
117       CURLOPT_PROGRESSDATA
118              Data pointer to pass to the progress meter  callback.  See  CUR‐
119              LOPT_PROGRESSDATA(3)
120
121       CURLOPT_XFERINFOFUNCTION
122              Callback for progress meter. See CURLOPT_XFERINFOFUNCTION(3)
123
124       CURLOPT_XFERINFODATA
125              Data  pointer  to  pass to the progress meter callback. See CUR‐
126              LOPT_XFERINFODATA(3)
127
128       CURLOPT_HEADERFUNCTION
129              Callback for writing received headers.  See  CURLOPT_HEADERFUNC‐
130              TION(3)
131
132       CURLOPT_HEADERDATA
133              Data pointer to pass to the header callback. See CURLOPT_HEADER‐
134              DATA(3)
135
136       CURLOPT_DEBUGFUNCTION
137              Callback for debug information. See CURLOPT_DEBUGFUNCTION(3)
138
139       CURLOPT_DEBUGDATA
140              Data pointer to pass to the debug callback.  See  CURLOPT_DEBUG‐
141              DATA(3)
142
143       CURLOPT_SSL_CTX_FUNCTION
144              Callback for SSL context logic. See CURLOPT_SSL_CTX_FUNCTION(3)
145
146       CURLOPT_SSL_CTX_DATA
147              Data  pointer  to  pass  to  the  SSL context callback. See CUR‐
148              LOPT_SSL_CTX_DATA(3)
149
150       CURLOPT_CONV_TO_NETWORK_FUNCTION
151              Callback for  code  base  conversion.  See  CURLOPT_CONV_TO_NET‐
152              WORK_FUNCTION(3)
153
154       CURLOPT_CONV_FROM_NETWORK_FUNCTION
155              Callback  for  code  base conversion. See CURLOPT_CONV_FROM_NET‐
156              WORK_FUNCTION(3)
157
158       CURLOPT_CONV_FROM_UTF8_FUNCTION
159              Callback    for    code    base     conversion.     See     CUR‐
160              LOPT_CONV_FROM_UTF8_FUNCTION(3)
161
162       CURLOPT_INTERLEAVEFUNCTION
163              Callback  for RTSP interleaved data. See CURLOPT_INTERLEAVEFUNC‐
164              TION(3)
165
166       CURLOPT_INTERLEAVEDATA
167              Data pointer to pass to the RTSP interleave callback.  See  CUR‐
168              LOPT_INTERLEAVEDATA(3)
169
170       CURLOPT_CHUNK_BGN_FUNCTION
171              Callback   for  wildcard  download  start  of  chunk.  See  CUR‐
172              LOPT_CHUNK_BGN_FUNCTION(3)
173
174       CURLOPT_CHUNK_END_FUNCTION
175              Callback  for  wildcard  download  end  of   chunk.   See   CUR‐
176              LOPT_CHUNK_END_FUNCTION(3)
177
178       CURLOPT_CHUNK_DATA
179              Data   pointer   to  pass  to  the  chunk  callbacks.  See  CUR‐
180              LOPT_CHUNK_DATA(3)
181
182       CURLOPT_FNMATCH_FUNCTION
183              Callback for wildcard matching. See CURLOPT_FNMATCH_FUNCTION(3)
184
185       CURLOPT_FNMATCH_DATA
186              Data pointer to pass to the wildcard matching callback. See CUR‐
187              LOPT_FNMATCH_DATA(3)
188
189       CURLOPT_SUPPRESS_CONNECT_HEADERS
190              Suppress proxy CONNECT response headers from user callbacks. See
191              CURLOPT_SUPPRESS_CONNECT_HEADERS(3)
192
193       CURLOPT_RESOLVER_START_FUNCTION
194              Callback to be called before a new resolve request  is  started.
195              See CURLOPT_RESOLVER_START_FUNCTION(3)
196
197       CURLOPT_RESOLVER_START_DATA
198              Data pointer to pass to resolver start callback. See CURLOPT_RE‐
199              SOLVER_START_DATA(3)
200

ERROR OPTIONS

202       CURLOPT_ERRORBUFFER
203              Error message buffer. See CURLOPT_ERRORBUFFER(3)
204
205       CURLOPT_STDERR
206              stderr replacement stream. See CURLOPT_STDERR(3)
207
208       CURLOPT_FAILONERROR
209              Fail on HTTP 4xx errors. CURLOPT_FAILONERROR(3)
210
211       CURLOPT_KEEP_SENDING_ON_ERROR
212              Keep sending on HTTP >= 300 errors.  CURLOPT_KEEP_SENDING_ON_ER‐
213              ROR(3)
214

NETWORK OPTIONS

216       CURLOPT_URL
217              URL to work on. See CURLOPT_URL(3)
218
219       CURLOPT_PATH_AS_IS
220              Disable  squashing  /../ and /./ sequences in the path. See CUR‐
221              LOPT_PATH_AS_IS(3)
222
223       CURLOPT_PROTOCOLS
224              Allowed protocols. See CURLOPT_PROTOCOLS(3)
225
226       CURLOPT_REDIR_PROTOCOLS
227              Protocols to allow redirects to. See CURLOPT_REDIR_PROTOCOLS(3)
228
229       CURLOPT_DEFAULT_PROTOCOL
230              Default protocol. See CURLOPT_DEFAULT_PROTOCOL(3)
231
232       CURLOPT_PROXY
233              Proxy to use. See CURLOPT_PROXY(3)
234
235       CURLOPT_PRE_PROXY
236              Socks proxy to use. See CURLOPT_PRE_PROXY(3)
237
238       CURLOPT_PROXYPORT
239              Proxy port to use. See CURLOPT_PROXYPORT(3)
240
241       CURLOPT_PROXYTYPE
242              Proxy type. See CURLOPT_PROXYTYPE(3)
243
244       CURLOPT_NOPROXY
245              Filter out hosts from proxy use. CURLOPT_NOPROXY(3)
246
247       CURLOPT_HTTPPROXYTUNNEL
248              Tunnel through the HTTP proxy. CURLOPT_HTTPPROXYTUNNEL(3)
249
250       CURLOPT_CONNECT_TO
251              Connect to a specific host and port. See CURLOPT_CONNECT_TO(3)
252
253       CURLOPT_SOCKS5_AUTH
254              Socks5 authentication methods. See CURLOPT_SOCKS5_AUTH(3)
255
256       CURLOPT_SOCKS5_GSSAPI_SERVICE
257              Socks5 GSSAPI service name. CURLOPT_SOCKS5_GSSAPI_SERVICE(3)
258
259       CURLOPT_SOCKS5_GSSAPI_NEC
260              Socks5 GSSAPI NEC mode. See CURLOPT_SOCKS5_GSSAPI_NEC(3)
261
262       CURLOPT_PROXY_SERVICE_NAME
263              Proxy authentication service name. CURLOPT_PROXY_SERVICE_NAME(3)
264
265       CURLOPT_HAPROXYPROTOCOL
266              Send an HAProxy PROXY protocol v1  header.  See  CURLOPT_HAPROX‐
267              YPROTOCOL(3)
268
269       CURLOPT_SERVICE_NAME
270              Authentication service name. CURLOPT_SERVICE_NAME(3)
271
272       CURLOPT_INTERFACE
273              Bind connection locally to this. See CURLOPT_INTERFACE(3)
274
275       CURLOPT_LOCALPORT
276              Bind connection locally to this port. See CURLOPT_LOCALPORT(3)
277
278       CURLOPT_LOCALPORTRANGE
279              Bind  connection  locally  to  port range. See CURLOPT_LOCALPOR‐
280              TRANGE(3)
281
282       CURLOPT_DNS_CACHE_TIMEOUT
283              Timeout for DNS cache. See CURLOPT_DNS_CACHE_TIMEOUT(3)
284
285       CURLOPT_DNS_USE_GLOBAL_CACHE
286              OBSOLETE    Enable    global     DNS     cache.     See     CUR‐
287              LOPT_DNS_USE_GLOBAL_CACHE(3)
288
289       CURLOPT_DOH_URL
290              Use this DoH server for name resolves. See CURLOPT_DOH_URL(3)
291
292       CURLOPT_BUFFERSIZE
293              Ask for alternate buffer size. See CURLOPT_BUFFERSIZE(3)
294
295       CURLOPT_PORT
296              Port number to connect to. See CURLOPT_PORT(3)
297
298       CURLOPT_TCP_FASTOPEN
299              Enable TFO, TCP Fast Open. See CURLOPT_TCP_FASTOPEN(3)
300
301       CURLOPT_TCP_NODELAY
302              Disable the Nagle algorithm. See CURLOPT_TCP_NODELAY(3)
303
304       CURLOPT_ADDRESS_SCOPE
305              IPv6 scope for local addresses. See CURLOPT_ADDRESS_SCOPE(3)
306
307       CURLOPT_TCP_KEEPALIVE
308              Enable TCP keep-alive. See CURLOPT_TCP_KEEPALIVE(3)
309
310       CURLOPT_TCP_KEEPIDLE
311              Idle time before sending keep-alive. See CURLOPT_TCP_KEEPIDLE(3)
312
313       CURLOPT_TCP_KEEPINTVL
314              Interval between keep-alive probes. See CURLOPT_TCP_KEEPINTVL(3)
315
316       CURLOPT_UNIX_SOCKET_PATH
317              Path to a Unix domain socket. See CURLOPT_UNIX_SOCKET_PATH(3)
318
319       CURLOPT_ABSTRACT_UNIX_SOCKET
320              Path   to  an  abstract  Unix  domain  socket.  See  CURLOPT_AB‐
321              STRACT_UNIX_SOCKET(3)
322

NAMES and PASSWORDS OPTIONS (Authentication)

324       CURLOPT_NETRC
325              Enable .netrc parsing. See CURLOPT_NETRC(3)
326
327       CURLOPT_NETRC_FILE
328              .netrc file name. See CURLOPT_NETRC_FILE(3)
329
330       CURLOPT_USERPWD
331              User name and password. See CURLOPT_USERPWD(3)
332
333       CURLOPT_PROXYUSERPWD
334              Proxy user name and password. See CURLOPT_PROXYUSERPWD(3)
335
336       CURLOPT_USERNAME
337              User name. See CURLOPT_USERNAME(3)
338
339       CURLOPT_PASSWORD
340              Password. See CURLOPT_PASSWORD(3)
341
342       CURLOPT_LOGIN_OPTIONS
343              Login options. See CURLOPT_LOGIN_OPTIONS(3)
344
345       CURLOPT_PROXYUSERNAME
346              Proxy user name. See CURLOPT_PROXYUSERNAME(3)
347
348       CURLOPT_PROXYPASSWORD
349              Proxy password. See CURLOPT_PROXYPASSWORD(3)
350
351       CURLOPT_HTTPAUTH
352              HTTP server authentication methods. See CURLOPT_HTTPAUTH(3)
353
354       CURLOPT_TLSAUTH_USERNAME
355              TLS authentication user name. See CURLOPT_TLSAUTH_USERNAME(3)
356
357       CURLOPT_PROXY_TLSAUTH_USERNAME
358              Proxy  TLS  authentication  user  name.  See   CURLOPT_PROXY_TL‐
359              SAUTH_USERNAME(3)
360
361       CURLOPT_TLSAUTH_PASSWORD
362              TLS authentication password. See CURLOPT_TLSAUTH_PASSWORD(3)
363
364       CURLOPT_PROXY_TLSAUTH_PASSWORD
365              Proxy   TLS   authentication   password.  See  CURLOPT_PROXY_TL‐
366              SAUTH_PASSWORD(3)
367
368       CURLOPT_TLSAUTH_TYPE
369              TLS authentication methods. See CURLOPT_TLSAUTH_TYPE(3)
370
371       CURLOPT_PROXY_TLSAUTH_TYPE
372              Proxy  TLS   authentication   methods.   See   CURLOPT_PROXY_TL‐
373              SAUTH_TYPE(3)
374
375       CURLOPT_PROXYAUTH
376              HTTP proxy authentication methods. See CURLOPT_PROXYAUTH(3)
377
378       CURLOPT_SASL_AUTHZID
379              SASL  authorisation  identity  (identity  to  act  as). See CUR‐
380              LOPT_SASL_AUTHZID(3)
381
382       CURLOPT_SASL_IR
383              Enable SASL initial response. See CURLOPT_SASL_IR(3)
384
385       CURLOPT_XOAUTH2_BEARER
386              OAuth2 bearer token. See CURLOPT_XOAUTH2_BEARER(3)
387
388       CURLOPT_DISALLOW_USERNAME_IN_URL
389              Don't  allow  username  in   URL.   See   CURLOPT_DISALLOW_USER‐
390              NAME_IN_URL(3)
391

HTTP OPTIONS

393       CURLOPT_AUTOREFERER
394              Automatically set Referer: header. See CURLOPT_AUTOREFERER(3)
395
396       CURLOPT_ACCEPT_ENCODING
397              Accept-Encoding  and  automatic  decompressing  data.  See  CUR‐
398              LOPT_ACCEPT_ENCODING(3)
399
400       CURLOPT_TRANSFER_ENCODING
401              Request Transfer-Encoding. See CURLOPT_TRANSFER_ENCODING(3)
402
403       CURLOPT_FOLLOWLOCATION
404              Follow HTTP redirects. See CURLOPT_FOLLOWLOCATION(3)
405
406       CURLOPT_UNRESTRICTED_AUTH
407              Do not restrict authentication to original  host.  CURLOPT_UNRE‐
408              STRICTED_AUTH(3)
409
410       CURLOPT_MAXREDIRS
411              Maximum number of redirects to follow. See CURLOPT_MAXREDIRS(3)
412
413       CURLOPT_POSTREDIR
414              How to act on redirects after POST. See CURLOPT_POSTREDIR(3)
415
416       CURLOPT_PUT
417              Issue an HTTP PUT request. See CURLOPT_PUT(3)
418
419       CURLOPT_POST
420              Issue an HTTP POST request. See CURLOPT_POST(3)
421
422       CURLOPT_POSTFIELDS
423              Send a POST with this data. See CURLOPT_POSTFIELDS(3)
424
425       CURLOPT_POSTFIELDSIZE
426              The POST data is this big. See CURLOPT_POSTFIELDSIZE(3)
427
428       CURLOPT_POSTFIELDSIZE_LARGE
429              The POST data is this big. See CURLOPT_POSTFIELDSIZE_LARGE(3)
430
431       CURLOPT_COPYPOSTFIELDS
432              Send  a POST with this data - and copy it. See CURLOPT_COPYPOST‐
433              FIELDS(3)
434
435       CURLOPT_HTTPPOST
436              Multipart formpost HTTP POST. See CURLOPT_HTTPPOST(3)
437
438       CURLOPT_REFERER
439              Referer: header. See CURLOPT_REFERER(3)
440
441       CURLOPT_USERAGENT
442              User-Agent: header. See CURLOPT_USERAGENT(3)
443
444       CURLOPT_HTTPHEADER
445              Custom HTTP headers. See CURLOPT_HTTPHEADER(3)
446
447       CURLOPT_HEADEROPT
448              Control custom headers. See CURLOPT_HEADEROPT(3)
449
450       CURLOPT_PROXYHEADER
451              Custom HTTP headers sent to proxy. See CURLOPT_PROXYHEADER(3)
452
453       CURLOPT_HTTP200ALIASES
454              Alternative versions of 200 OK. See CURLOPT_HTTP200ALIASES(3)
455
456       CURLOPT_COOKIE
457              Cookie(s) to send. See CURLOPT_COOKIE(3)
458
459       CURLOPT_COOKIEFILE
460              File to read cookies from. See CURLOPT_COOKIEFILE(3)
461
462       CURLOPT_COOKIEJAR
463              File to write cookies to. See CURLOPT_COOKIEJAR(3)
464
465       CURLOPT_COOKIESESSION
466              Start a new cookie session. See CURLOPT_COOKIESESSION(3)
467
468       CURLOPT_COOKIELIST
469              Add or control cookies. See CURLOPT_COOKIELIST(3)
470
471       CURLOPT_ALTSVC
472              Specify the Alt-Svc: cache file name. See CURLOPT_ALTSVC(3)
473
474       CURLOPT_ALTSVC_CTRL
475              Enable   and   configure   Alt-Svc:    treatment.    See    CUR‐
476              LOPT_ALTSVC_CTRL(3)
477
478       CURLOPT_HSTS
479              Set HSTS cache file. See CURLOPT_HSTS(3)
480
481       CURLOPT_HSTS_CTRL
482              Enable HSTS. See CURLOPT_HSTS_CTRL(3)
483
484       CURLOPT_HSTSREADFUNCTION
485              Set HSTS read callback. See CURLOPT_HSTSREADFUNCTION(3)
486
487       CURLOPT_HSTSREADDATA
488              Pass  pointer  to  the HSTS read callback. See CURLOPT_HSTSREAD‐
489              DATA(3)
490
491       CURLOPT_HSTSWRITEFUNCTION
492              Set HSTS write callback. See CURLOPT_HSTSWRITEFUNCTION(3)
493
494       CURLOPT_HSTSWRITEDATA
495              Pass pointer to the HSTS write callback. See  CURLOPT_HSTSWRITE‐
496              DATA(3)
497
498       CURLOPT_HTTPGET
499              Do an HTTP GET request. See CURLOPT_HTTPGET(3)
500
501       CURLOPT_REQUEST_TARGET
502              Set the request target. CURLOPT_REQUEST_TARGET(3)
503
504       CURLOPT_HTTP_VERSION
505              HTTP version to use. CURLOPT_HTTP_VERSION(3)
506
507       CURLOPT_HTTP09_ALLOWED
508              Allow HTTP/0.9 responses. CURLOPT_HTTP09_ALLOWED(3)
509
510       CURLOPT_IGNORE_CONTENT_LENGTH
511              Ignore Content-Length. See CURLOPT_IGNORE_CONTENT_LENGTH(3)
512
513       CURLOPT_HTTP_CONTENT_DECODING
514              Disable Content decoding. See CURLOPT_HTTP_CONTENT_DECODING(3)
515
516       CURLOPT_HTTP_TRANSFER_DECODING
517              Disable Transfer decoding. See CURLOPT_HTTP_TRANSFER_DECODING(3)
518
519       CURLOPT_EXPECT_100_TIMEOUT_MS
520              100-continue timeout. See CURLOPT_EXPECT_100_TIMEOUT_MS(3)
521
522       CURLOPT_TRAILERFUNCTION
523              Set  callback for sending trailing headers. See CURLOPT_TRAILER‐
524              FUNCTION(3)
525
526       CURLOPT_TRAILERDATA
527              Custom pointer passed to the trailing headers callback. See CUR‐
528              LOPT_TRAILERDATA(3)
529
530       CURLOPT_PIPEWAIT
531              Wait on connection to pipeline on it. See CURLOPT_PIPEWAIT(3)
532
533       CURLOPT_STREAM_DEPENDS
534              This  HTTP/2  stream  depends on another. See CURLOPT_STREAM_DE‐
535              PENDS(3)
536
537       CURLOPT_STREAM_DEPENDS_E
538              This HTTP/2 stream depends  on  another  exclusively.  See  CUR‐
539              LOPT_STREAM_DEPENDS_E(3)
540
541       CURLOPT_STREAM_WEIGHT
542              Set this HTTP/2 stream's weight. See CURLOPT_STREAM_WEIGHT(3)
543

SMTP OPTIONS

545       CURLOPT_MAIL_FROM
546              Address of the sender. See CURLOPT_MAIL_FROM(3)
547
548       CURLOPT_MAIL_RCPT
549              Address of the recipients. See CURLOPT_MAIL_RCPT(3)
550
551       CURLOPT_MAIL_AUTH
552              Authentication address. See CURLOPT_MAIL_AUTH(3)
553
554       CURLOPT_MAIL_RCPT_ALLLOWFAILS
555              Allow  RCPT  TO  command  to  fail for some recipients. See CUR‐
556              LOPT_MAIL_RCPT_ALLLOWFAILS(3)
557

TFTP OPTIONS

559       CURLOPT_TFTP_BLKSIZE
560              TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
561
562       CURLOPT_TFTP_NO_OPTIONS
563              Do not  send  TFTP  options  requests.  See  CURLOPT_TFTP_NO_OP‐
564              TIONS(3)
565

FTP OPTIONS

567       CURLOPT_FTPPORT
568              Use active FTP. See CURLOPT_FTPPORT(3)
569
570       CURLOPT_QUOTE
571              Commands to run before transfer. See CURLOPT_QUOTE(3)
572
573       CURLOPT_POSTQUOTE
574              Commands to run after transfer. See CURLOPT_POSTQUOTE(3)
575
576       CURLOPT_PREQUOTE
577              Commands to run just before transfer. See CURLOPT_PREQUOTE(3)
578
579       CURLOPT_APPEND
580              Append to remote file. See CURLOPT_APPEND(3)
581
582       CURLOPT_FTP_USE_EPRT
583              Use EPTR. See CURLOPT_FTP_USE_EPRT(3)
584
585       CURLOPT_FTP_USE_EPSV
586              Use EPSV. See CURLOPT_FTP_USE_EPSV(3)
587
588       CURLOPT_FTP_USE_PRET
589              Use PRET. See CURLOPT_FTP_USE_PRET(3)
590
591       CURLOPT_FTP_CREATE_MISSING_DIRS
592              Create  missing  directories  on  the  remote  server.  See CUR‐
593              LOPT_FTP_CREATE_MISSING_DIRS(3)
594
595       CURLOPT_FTP_RESPONSE_TIMEOUT
596              Timeout for FTP responses. See CURLOPT_FTP_RESPONSE_TIMEOUT(3)
597
598       CURLOPT_FTP_ALTERNATIVE_TO_USER
599              Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
600
601       CURLOPT_FTP_SKIP_PASV_IP
602              Ignore  the  IP  address  in  the  PASV   response.   See   CUR‐
603              LOPT_FTP_SKIP_PASV_IP(3)
604
605       CURLOPT_FTPSSLAUTH
606              Control how to do TLS. See CURLOPT_FTPSSLAUTH(3)
607
608       CURLOPT_FTP_SSL_CCC
609              Back   to   non-TLS   again   after   authentication.  See  CUR‐
610              LOPT_FTP_SSL_CCC(3)
611
612       CURLOPT_FTP_ACCOUNT
613              Send ACCT command. See CURLOPT_FTP_ACCOUNT(3)
614
615       CURLOPT_FTP_FILEMETHOD
616              Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3)
617

RTSP OPTIONS

619       CURLOPT_RTSP_REQUEST
620              RTSP request. See CURLOPT_RTSP_REQUEST(3)
621
622       CURLOPT_RTSP_SESSION_ID
623              RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
624
625       CURLOPT_RTSP_STREAM_URI
626              RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
627
628       CURLOPT_RTSP_TRANSPORT
629              RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
630
631       CURLOPT_RTSP_CLIENT_CSEQ
632              Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
633
634       CURLOPT_RTSP_SERVER_CSEQ
635              CSEQ  number  for  RTSP   Server->Client   request.   See   CUR‐
636              LOPT_RTSP_SERVER_CSEQ(3)
637
638       CURLOPT_AWS_SIGV4
639              AWS HTTP V4 Signature. See CURLOPT_AWS_SIGV4(3)
640

PROTOCOL OPTIONS

642       CURLOPT_TRANSFERTEXT
643              Use text transfer. See CURLOPT_TRANSFERTEXT(3)
644
645       CURLOPT_PROXY_TRANSFER_MODE
646              Add  transfer  mode  to URL over proxy. See CURLOPT_PROXY_TRANS‐
647              FER_MODE(3)
648
649       CURLOPT_CRLF
650              Convert newlines. See CURLOPT_CRLF(3)
651
652       CURLOPT_RANGE
653              Range requests. See CURLOPT_RANGE(3)
654
655       CURLOPT_RESUME_FROM
656              Resume a transfer. See CURLOPT_RESUME_FROM(3)
657
658       CURLOPT_RESUME_FROM_LARGE
659              Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3)
660
661       CURLOPT_CURLU
662              Set URL to work on with CURLU *. See CURLOPT_CURLU(3)
663
664       CURLOPT_CUSTOMREQUEST
665              Custom request/method. See CURLOPT_CUSTOMREQUEST(3)
666
667       CURLOPT_FILETIME
668              Request file modification date and time. See CURLOPT_FILETIME(3)
669
670       CURLOPT_DIRLISTONLY
671              List only. See CURLOPT_DIRLISTONLY(3)
672
673       CURLOPT_NOBODY
674              Do not get the body contents. See CURLOPT_NOBODY(3)
675
676       CURLOPT_INFILESIZE
677              Size of file to send. CURLOPT_INFILESIZE(3)
678
679       CURLOPT_INFILESIZE_LARGE
680              Size of file to send. CURLOPT_INFILESIZE_LARGE(3)
681
682       CURLOPT_UPLOAD
683              Upload data. See CURLOPT_UPLOAD(3)
684
685       CURLOPT_UPLOAD_BUFFERSIZE
686              Set upload buffer size. See CURLOPT_UPLOAD_BUFFERSIZE(3)
687
688       CURLOPT_MIMEPOST
689              Post/send MIME data. See CURLOPT_MIMEPOST(3)
690
691       CURLOPT_MAXFILESIZE
692              Maximum file size to get. See CURLOPT_MAXFILESIZE(3)
693
694       CURLOPT_MAXFILESIZE_LARGE
695              Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3)
696
697       CURLOPT_TIMECONDITION
698              Make a time conditional request. See CURLOPT_TIMECONDITION(3)
699
700       CURLOPT_TIMEVALUE
701              Time  value  for  the  time  conditional   request.   See   CUR‐
702              LOPT_TIMEVALUE(3)
703
704       CURLOPT_TIMEVALUE_LARGE
705              Time   value   for   the  time  conditional  request.  See  CUR‐
706              LOPT_TIMEVALUE_LARGE(3)
707

CONNECTION OPTIONS

709       CURLOPT_TIMEOUT
710              Timeout for the entire request. See CURLOPT_TIMEOUT(3)
711
712       CURLOPT_TIMEOUT_MS
713              Millisecond timeout for the entire  request.  See  CURLOPT_TIME‐
714              OUT_MS(3)
715
716       CURLOPT_LOW_SPEED_LIMIT
717              Low    speed    limit    to    abort    transfer.    See    CUR‐
718              LOPT_LOW_SPEED_LIMIT(3)
719
720       CURLOPT_LOW_SPEED_TIME
721              Time to be below the speed to trigger low speed abort. See  CUR‐
722              LOPT_LOW_SPEED_TIME(3)
723
724       CURLOPT_MAX_SEND_SPEED_LARGE
725              Cap     the     upload     speed     to     this.    See    CUR‐
726              LOPT_MAX_SEND_SPEED_LARGE(3)
727
728       CURLOPT_MAX_RECV_SPEED_LARGE
729              Cap    the    download    speed    to     this.     See     CUR‐
730              LOPT_MAX_RECV_SPEED_LARGE(3)
731
732       CURLOPT_MAXCONNECTS
733              Maximum  number  of connections in the connection pool. See CUR‐
734              LOPT_MAXCONNECTS(3)
735
736       CURLOPT_FRESH_CONNECT
737              Use a new connection. CURLOPT_FRESH_CONNECT(3)
738
739       CURLOPT_FORBID_REUSE
740              Prevent subsequent connections  from  re-using  this.  See  CUR‐
741              LOPT_FORBID_REUSE(3)
742
743       CURLOPT_MAXAGE_CONN
744              Limit  the  age  of  connections  for  reuse.  See  CURLOPT_MAX‐
745              AGE_CONN(3)
746
747       CURLOPT_CONNECTTIMEOUT
748              Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3)
749
750       CURLOPT_CONNECTTIMEOUT_MS
751              Millisecond timeout for the connection phase.  See  CURLOPT_CON‐
752              NECTTIMEOUT_MS(3)
753
754       CURLOPT_IPRESOLVE
755              IP version to use. See CURLOPT_IPRESOLVE(3)
756
757       CURLOPT_CONNECT_ONLY
758              Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3)
759
760       CURLOPT_USE_SSL
761              Use TLS/SSL. See CURLOPT_USE_SSL(3)
762
763       CURLOPT_RESOLVE
764              Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3)
765
766       CURLOPT_DNS_INTERFACE
767              Bind  name  resolves  to  this interface. See CURLOPT_DNS_INTER‐
768              FACE(3)
769
770       CURLOPT_DNS_LOCAL_IP4
771              Bind name resolves to  this  IP4  address.  See  CURLOPT_DNS_LO‐
772              CAL_IP4(3)
773
774       CURLOPT_DNS_LOCAL_IP6
775              Bind  name  resolves  to  this  IP6 address. See CURLOPT_DNS_LO‐
776              CAL_IP6(3)
777
778       CURLOPT_DNS_SERVERS
779              Preferred DNS servers. See CURLOPT_DNS_SERVERS(3)
780
781       CURLOPT_DNS_SHUFFLE_ADDRESSES
782              Shuffle  addresses  before  use.   See   CURLOPT_DNS_SHUFFLE_AD‐
783              DRESSES(3)
784
785       CURLOPT_ACCEPTTIMEOUT_MS
786              Timeout  for  waiting  for  the  server's connect back to be ac‐
787              cepted. See CURLOPT_ACCEPTTIMEOUT_MS(3)
788
789       CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
790              Timeout for  happy  eyeballs.  See  CURLOPT_HAPPY_EYEBALLS_TIME‐
791              OUT_MS(3)
792
793       CURLOPT_UPKEEP_INTERVAL_MS
794              Sets  the interval at which connection upkeep are performed. See
795              CURLOPT_UPKEEP_INTERVAL_MS(3)
796

SSL and SECURITY OPTIONS

798       CURLOPT_SSLCERT
799              Client cert. See CURLOPT_SSLCERT(3)
800
801       CURLOPT_SSLCERT_BLOB
802              Client cert memory buffer. See CURLOPT_SSLCERT_BLOB(3)
803
804       CURLOPT_PROXY_SSLCERT
805              Proxy client cert. See CURLOPT_PROXY_SSLCERT(3)
806
807       CURLOPT_PROXY_SSLCERT_BLOB
808              Proxy    client     cert     memory     buffer.     See     CUR‐
809              LOPT_PROXY_SSLCERT_BLOB(3)
810
811       CURLOPT_SSLCERTTYPE
812              Client cert type.  See CURLOPT_SSLCERTTYPE(3)
813
814       CURLOPT_PROXY_SSLCERTTYPE
815              Proxy client cert type.  See CURLOPT_PROXY_SSLCERTTYPE(3)
816
817       CURLOPT_SSLKEY
818              Client key. See CURLOPT_SSLKEY(3)
819
820       CURLOPT_SSLKEY_BLOB
821              Client key memory buffer. See CURLOPT_SSLKEY_BLOB(3)
822
823       CURLOPT_PROXY_SSLKEY
824              Proxy client key. See CURLOPT_PROXY_SSLKEY(3)
825
826       CURLOPT_PROXY_SSLKEY_BLOB
827              Proxy client key. See CURLOPT_PROXY_SSLKEY_BLOB(3)
828
829       CURLOPT_SSLKEYTYPE
830              Client key type. See CURLOPT_SSLKEYTYPE(3)
831
832       CURLOPT_PROXY_SSLKEYTYPE
833              Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3)
834
835       CURLOPT_KEYPASSWD
836              Client key password. See CURLOPT_KEYPASSWD(3)
837
838       CURLOPT_PROXY_KEYPASSWD
839              Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3)
840
841       CURLOPT_SSL_EC_CURVES
842              Set key exchange curves. See CURLOPT_SSL_EC_CURVES(3)
843
844       CURLOPT_SSL_ENABLE_ALPN
845              Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3)
846
847       CURLOPT_SSL_ENABLE_NPN
848              Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3)
849
850       CURLOPT_SSLENGINE
851              Use identifier with SSL engine. See CURLOPT_SSLENGINE(3)
852
853       CURLOPT_SSLENGINE_DEFAULT
854              Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3)
855
856       CURLOPT_SSL_FALSESTART
857              Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3)
858
859       CURLOPT_SSLVERSION
860              SSL version to use. See CURLOPT_SSLVERSION(3)
861
862       CURLOPT_PROXY_SSLVERSION
863              Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3)
864
865       CURLOPT_SSL_VERIFYHOST
866              Verify   the   host  name  in  the  SSL  certificate.  See  CUR‐
867              LOPT_SSL_VERIFYHOST(3)
868
869       CURLOPT_DOH_SSL_VERIFYHOST
870              Verify the host name in the DoH  (DNS-over-HTTPS)  SSL  certifi‐
871              cate. See CURLOPT_DOH_SSL_VERIFYHOST(3)
872
873       CURLOPT_PROXY_SSL_VERIFYHOST
874              Verify  the  host  name  in  the proxy SSL certificate. See CUR‐
875              LOPT_PROXY_SSL_VERIFYHOST(3)
876
877       CURLOPT_SSL_VERIFYPEER
878              Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3)
879
880       CURLOPT_DOH_SSL_VERIFYPEER
881              Verify  the  DoH  (DNS-over-HTTPS)  SSL  certificate.  See  CUR‐
882              LOPT_DOH_SSL_VERIFYPEER(3)
883
884       CURLOPT_PROXY_SSL_VERIFYPEER
885              Verify  the  proxy  SSL certificate. See CURLOPT_PROXY_SSL_VERI‐
886              FYPEER(3)
887
888       CURLOPT_SSL_VERIFYSTATUS
889              Verify the SSL certificate's status. See  CURLOPT_SSL_VERIFYSTA‐
890              TUS(3)
891
892       CURLOPT_DOH_SSL_VERIFYSTATUS
893              Verify  the  DoH  (DNS-over-HTTPS) SSL certificate's status. See
894              CURLOPT_DOH_SSL_VERIFYSTATUS(3)
895
896       CURLOPT_CAINFO
897              CA cert bundle. See CURLOPT_CAINFO(3)
898
899       CURLOPT_CAINFO_BLOB
900              CA cert bundle memory buffer. See CURLOPT_CAINFO_BLOB(3)
901
902       CURLOPT_PROXY_CAINFO
903              Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3)
904
905       CURLOPT_PROXY_CAINFO_BLOB
906              Proxy   CA    cert    bundle    memory    buffer.    See    CUR‐
907              LOPT_PROXY_CAINFO_BLOB(3)
908
909       CURLOPT_ISSUERCERT
910              Issuer certificate. See CURLOPT_ISSUERCERT(3)
911
912       CURLOPT_ISSUERCERT_BLOB
913              Issuer certificate memory buffer. See CURLOPT_ISSUERCERT_BLOB(3)
914
915       CURLOPT_PROXY_ISSUERCERT
916              Proxy issuer certificate. See CURLOPT_PROXY_ISSUERCERT(3)
917
918       CURLOPT_PROXY_ISSUERCERT_BLOB
919              Proxy  issuer  certificate  memory buffer. See CURLOPT_PROXY_IS‐
920              SUERCERT_BLOB(3)
921
922       CURLOPT_CAPATH
923              Path to CA cert bundle. See CURLOPT_CAPATH(3)
924
925       CURLOPT_PROXY_CAPATH
926              Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3)
927
928       CURLOPT_CRLFILE
929              Certificate Revocation List. See CURLOPT_CRLFILE(3)
930
931       CURLOPT_PROXY_CRLFILE
932              Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3)
933
934       CURLOPT_CERTINFO
935              Extract certificate info. See CURLOPT_CERTINFO(3)
936
937       CURLOPT_PINNEDPUBLICKEY
938              Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3)
939
940       CURLOPT_PROXY_PINNEDPUBLICKEY
941              Set the proxy's pinned SSL public key. See CURLOPT_PROXY_PINNED‐
942              PUBLICKEY(3)
943
944       CURLOPT_RANDOM_FILE
945              Provide   source  for  entropy  random  data.  See  CURLOPT_RAN‐
946              DOM_FILE(3)
947
948       CURLOPT_EGDSOCKET
949              Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3)
950
951       CURLOPT_SSL_CIPHER_LIST
952              Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3)
953
954       CURLOPT_PROXY_SSL_CIPHER_LIST
955              Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3)
956
957       CURLOPT_TLS13_CIPHERS
958              TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3)
959
960       CURLOPT_PROXY_TLS13_CIPHERS
961              Proxy TLS 1.3 cipher suites to use. See  CURLOPT_PROXY_TLS13_CI‐
962              PHERS(3)
963
964       CURLOPT_SSL_SESSIONID_CACHE
965              Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3)
966
967       CURLOPT_SSL_OPTIONS
968              Control SSL behavior. See CURLOPT_SSL_OPTIONS(3)
969
970       CURLOPT_PROXY_SSL_OPTIONS
971              Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3)
972
973       CURLOPT_KRBLEVEL
974              Kerberos security level. See CURLOPT_KRBLEVEL(3)
975
976       CURLOPT_GSSAPI_DELEGATION
977              Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3)
978

SSH OPTIONS

980       CURLOPT_SSH_AUTH_TYPES
981              SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
982
983       CURLOPT_SSH_COMPRESSION
984              Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
985
986       CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
987              MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
988
989       CURLOPT_SSH_PUBLIC_KEYFILE
990              File name of public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
991
992       CURLOPT_SSH_PRIVATE_KEYFILE
993              File name of private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
994
995       CURLOPT_SSH_KNOWNHOSTS
996              File name with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
997
998       CURLOPT_SSH_KEYFUNCTION
999              Callback  for  known  hosts  handling.  See CURLOPT_SSH_KEYFUNC‐
1000              TION(3)
1001
1002       CURLOPT_SSH_KEYDATA
1003              Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEY‐
1004              DATA(3)
1005

OTHER OPTIONS

1007       CURLOPT_PRIVATE
1008              Private pointer to store. See CURLOPT_PRIVATE(3)
1009
1010       CURLOPT_SHARE
1011              Share object to use. See CURLOPT_SHARE(3)
1012
1013       CURLOPT_NEW_FILE_PERMS
1014              Mode    for    creating    new    remote    files.    See   CUR‐
1015              LOPT_NEW_FILE_PERMS(3)
1016
1017       CURLOPT_NEW_DIRECTORY_PERMS
1018              Mode for creating new remote directories. See CURLOPT_NEW_DIREC‐
1019              TORY_PERMS(3)
1020

TELNET OPTIONS

1022       CURLOPT_TELNETOPTIONS
1023              TELNET options. See CURLOPT_TELNETOPTIONS(3)
1024

RETURN VALUE

1026       CURLE_OK  (zero) means that the option was set properly, non-zero means
1027       an error occurred as <curl/curl.h> defines. See  the  libcurl-errors(3)
1028       man page for the full list with descriptions.
1029
1030       Strings passed on to libcurl must be shorter than 8000000 bytes, other‐
1031       wise curl_easy_setopt(3) returns CURLE_BAD_FUNCTION_ARGUMENT (added  in
1032       7.65.0).
1033
1034       CURLE_BAD_FUNCTION_ARGUMENT  is returned when the argument to an option
1035       is invalid, like perhaps out of range.
1036
1037       If you try to set an option that libcurl doesn't  know  about,  perhaps
1038       because  the library is too old to support it or the option was removed
1039       in a recent version, this function will return CURLE_UNKNOWN_OPTION. If
1040       support  for  the  option  was disabled at compile-time, it will return
1041       CURLE_NOT_BUILT_IN.
1042

EXAMPLE

1044       CURL *curl = curl_easy_init();
1045       if(curl) {
1046         CURLcode res;
1047         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
1048         res = curl_easy_perform(curl);
1049         curl_easy_cleanup(curl);
1050       }
1051

SEE ALSO

1053       curl_easy_init(3),      curl_easy_cleanup(3),       curl_easy_reset(3),
1054       curl_easy_getinfo(3),  curl_multi_setopt(3),  curl_easy_option_next(3),
1055       curl_easy_option_by_name(3), curl_easy_option_by_id(3),
1056
1057
1058
1059libcurl 7.79.1                  August 26, 2021            curl_easy_setopt(3)
Impressum