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
27       optionally  reset  all  options   back   to   internal   default   with
28       curl_easy_reset(3).
29
30       Strings  passed  to  libcurl  as  'char *' arguments, are copied by the
31       library; thus the string storage associated to the pointer argument may
32       be overwritten after curl_easy_setopt(3) returns. The only exception to
33       this rule is really CURLOPT_POSTFIELDS(3),  but  the  alternative  that
34       copies the string CURLOPT_COPYPOSTFIELDS(3) has some usage characteris‐
35       tics you need to read up on.
36
37       The order in which the options are set does not matter.
38
39       Before version 7.17.0, strings were not copied. Instead  the  user  was
40       forced keep them available until libcurl no longer needed them.
41
42       The   handle   is   the   return   code  from  a  curl_easy_init(3)  or
43       curl_easy_duphandle(3) call.
44

BEHAVIOR OPTIONS

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

CALLBACK OPTIONS

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

ERROR OPTIONS

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

NETWORK OPTIONS

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

NAMES and PASSWORDS OPTIONS (Authentication)

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

HTTP OPTIONS

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

SMTP OPTIONS

524       CURLOPT_MAIL_FROM
525              Address of the sender. See CURLOPT_MAIL_FROM(3)
526
527       CURLOPT_MAIL_RCPT
528              Address of the recipients. See CURLOPT_MAIL_RCPT(3)
529
530       CURLOPT_MAIL_AUTH
531              Authentication address. See CURLOPT_MAIL_AUTH(3)
532

TFTP OPTIONS

534       CURLOPT_TFTP_BLKSIZE
535              TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
536
537       CURLOPT_TFTP_NO_OPTIONS
538              Do    not    send    TFTP    options    requests.    See    CUR‐
539              LOPT_TFTP_NO_OPTIONS(3)
540

FTP OPTIONS

542       CURLOPT_FTPPORT
543              Use active FTP. See CURLOPT_FTPPORT(3)
544
545       CURLOPT_QUOTE
546              Commands to run before transfer. See CURLOPT_QUOTE(3)
547
548       CURLOPT_POSTQUOTE
549              Commands to run after transfer. See CURLOPT_POSTQUOTE(3)
550
551       CURLOPT_PREQUOTE
552              Commands to run just before transfer. See CURLOPT_PREQUOTE(3)
553
554       CURLOPT_APPEND
555              Append to remote file. See CURLOPT_APPEND(3)
556
557       CURLOPT_FTP_USE_EPRT
558              Use EPTR. See CURLOPT_FTP_USE_EPRT(3)
559
560       CURLOPT_FTP_USE_EPSV
561              Use EPSV. See CURLOPT_FTP_USE_EPSV(3)
562
563       CURLOPT_FTP_USE_PRET
564              Use PRET. See CURLOPT_FTP_USE_PRET(3)
565
566       CURLOPT_FTP_CREATE_MISSING_DIRS
567              Create  missing  directories  on  the  remote  server.  See CUR‐
568              LOPT_FTP_CREATE_MISSING_DIRS(3)
569
570       CURLOPT_FTP_RESPONSE_TIMEOUT
571              Timeout for FTP responses. See CURLOPT_FTP_RESPONSE_TIMEOUT(3)
572
573       CURLOPT_FTP_ALTERNATIVE_TO_USER
574              Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
575
576       CURLOPT_FTP_SKIP_PASV_IP
577              Ignore  the  IP  address  in  the  PASV   response.   See   CUR‐
578              LOPT_FTP_SKIP_PASV_IP(3)
579
580       CURLOPT_FTPSSLAUTH
581              Control how to do TLS. See CURLOPT_FTPSSLAUTH(3)
582
583       CURLOPT_FTP_SSL_CCC
584              Back   to   non-TLS   again   after   authentication.  See  CUR‐
585              LOPT_FTP_SSL_CCC(3)
586
587       CURLOPT_FTP_ACCOUNT
588              Send ACCT command. See CURLOPT_FTP_ACCOUNT(3)
589
590       CURLOPT_FTP_FILEMETHOD
591              Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3)
592

RTSP OPTIONS

594       CURLOPT_RTSP_REQUEST
595              RTSP request. See CURLOPT_RTSP_REQUEST(3)
596
597       CURLOPT_RTSP_SESSION_ID
598              RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
599
600       CURLOPT_RTSP_STREAM_URI
601              RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
602
603       CURLOPT_RTSP_TRANSPORT
604              RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
605
606       CURLOPT_RTSP_CLIENT_CSEQ
607              Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
608
609       CURLOPT_RTSP_SERVER_CSEQ
610              CSEQ  number  for  RTSP   Server->Client   request.   See   CUR‐
611              LOPT_RTSP_SERVER_CSEQ(3)
612

PROTOCOL OPTIONS

614       CURLOPT_TRANSFERTEXT
615              Use text transfer. See CURLOPT_TRANSFERTEXT(3)
616
617       CURLOPT_PROXY_TRANSFER_MODE
618              Add  transfer  mode  to URL over proxy. See CURLOPT_PROXY_TRANS‐
619              FER_MODE(3)
620
621       CURLOPT_CRLF
622              Convert newlines. See CURLOPT_CRLF(3)
623
624       CURLOPT_RANGE
625              Range requests. See CURLOPT_RANGE(3)
626
627       CURLOPT_RESUME_FROM
628              Resume a transfer. See CURLOPT_RESUME_FROM(3)
629
630       CURLOPT_RESUME_FROM_LARGE
631              Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3)
632
633       CURLOPT_CURLU
634              Set URL to work on with CURLU *. See CURLOPT_CURLU(3)
635
636       CURLOPT_CUSTOMREQUEST
637              Custom request/method. See CURLOPT_CUSTOMREQUEST(3)
638
639       CURLOPT_FILETIME
640              Request file modification date and time. See CURLOPT_FILETIME(3)
641
642       CURLOPT_DIRLISTONLY
643              List only. See CURLOPT_DIRLISTONLY(3)
644
645       CURLOPT_NOBODY
646              Do not get the body contents. See CURLOPT_NOBODY(3)
647
648       CURLOPT_INFILESIZE
649              Size of file to send. CURLOPT_INFILESIZE(3)
650
651       CURLOPT_INFILESIZE_LARGE
652              Size of file to send. CURLOPT_INFILESIZE_LARGE(3)
653
654       CURLOPT_UPLOAD
655              Upload data. See CURLOPT_UPLOAD(3)
656
657       CURLOPT_UPLOAD_BUFFERSIZE
658              Set upload buffer size. See CURLOPT_UPLOAD_BUFFERSIZE(3)
659
660       CURLOPT_MIMEPOST
661              Post/send MIME data. See CURLOPT_MIMEPOST(3)
662
663       CURLOPT_MAXFILESIZE
664              Maximum file size to get. See CURLOPT_MAXFILESIZE(3)
665
666       CURLOPT_MAXFILESIZE_LARGE
667              Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3)
668
669       CURLOPT_TIMECONDITION
670              Make a time conditional request. See CURLOPT_TIMECONDITION(3)
671
672       CURLOPT_TIMEVALUE
673              Time  value  for  the  time  conditional   request.   See   CUR‐
674              LOPT_TIMEVALUE(3)
675
676       CURLOPT_TIMEVALUE_LARGE
677              Time   value   for   the  time  conditional  request.  See  CUR‐
678              LOPT_TIMEVALUE_LARGE(3)
679

CONNECTION OPTIONS

681       CURLOPT_TIMEOUT
682              Timeout for the entire request. See CURLOPT_TIMEOUT(3)
683
684       CURLOPT_TIMEOUT_MS
685              Millisecond timeout for the entire  request.  See  CURLOPT_TIME‐
686              OUT_MS(3)
687
688       CURLOPT_LOW_SPEED_LIMIT
689              Low    speed    limit    to    abort    transfer.    See    CUR‐
690              LOPT_LOW_SPEED_LIMIT(3)
691
692       CURLOPT_LOW_SPEED_TIME
693              Time to be below the speed to trigger low speed abort. See  CUR‐
694              LOPT_LOW_SPEED_TIME(3)
695
696       CURLOPT_MAX_SEND_SPEED_LARGE
697              Cap     the     upload     speed     to     this.    See    CUR‐
698              LOPT_MAX_SEND_SPEED_LARGE(3)
699
700       CURLOPT_MAX_RECV_SPEED_LARGE
701              Cap    the    download    speed    to     this.     See     CUR‐
702              LOPT_MAX_RECV_SPEED_LARGE(3)
703
704       CURLOPT_MAXCONNECTS
705              Maximum  number  of connections in the connection pool. See CUR‐
706              LOPT_MAXCONNECTS(3)
707
708       CURLOPT_FRESH_CONNECT
709              Use a new connection. CURLOPT_FRESH_CONNECT(3)
710
711       CURLOPT_FORBID_REUSE
712              Prevent subsequent connections  from  re-using  this.  See  CUR‐
713              LOPT_FORBID_REUSE(3)
714
715       CURLOPT_MAXAGE_CONN
716              Limit  the  age  of  connections  for  reuse.  See  CURLOPT_MAX‐
717              AGE_CONN(3)
718
719       CURLOPT_CONNECTTIMEOUT
720              Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3)
721
722       CURLOPT_CONNECTTIMEOUT_MS
723              Millisecond timeout for the connection phase.  See  CURLOPT_CON‐
724              NECTTIMEOUT_MS(3)
725
726       CURLOPT_IPRESOLVE
727              IP version to resolve to. See CURLOPT_IPRESOLVE(3)
728
729       CURLOPT_CONNECT_ONLY
730              Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3)
731
732       CURLOPT_USE_SSL
733              Use TLS/SSL. See CURLOPT_USE_SSL(3)
734
735       CURLOPT_RESOLVE
736              Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3)
737
738       CURLOPT_DNS_INTERFACE
739              Bind  name  resolves  to  this interface. See CURLOPT_DNS_INTER‐
740              FACE(3)
741
742       CURLOPT_DNS_LOCAL_IP4
743              Bind   name   resolves   to   this   IP4   address.   See   CUR‐
744              LOPT_DNS_LOCAL_IP4(3)
745
746       CURLOPT_DNS_LOCAL_IP6
747              Bind   name   resolves   to   this   IP6   address.   See   CUR‐
748              LOPT_DNS_LOCAL_IP6(3)
749
750       CURLOPT_DNS_SERVERS
751              Preferred DNS servers. See CURLOPT_DNS_SERVERS(3)
752
753       CURLOPT_DNS_SHUFFLE_ADDRESSES
754              Shuffle   addresses   before    use.    See    CURLOPT_DNS_SHUF‐
755              FLE_ADDRESSES(3)
756
757       CURLOPT_ACCEPTTIMEOUT_MS
758              Timeout  for  waiting  for  the  server's  connect  back  to  be
759              accepted. See CURLOPT_ACCEPTTIMEOUT_MS(3)
760
761       CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
762              Timeout for  happy  eyeballs.  See  CURLOPT_HAPPY_EYEBALLS_TIME‐
763              OUT_MS(3)
764
765       CURLOPT_UPKEEP_INTERVAL_MS
766              Sets  the interval at which connection upkeep are performed. See
767              CURLOPT_UPKEEP_INTERVAL_MS(3)
768

SSL and SECURITY OPTIONS

770       CURLOPT_SSLCERT
771              Client cert. See CURLOPT_SSLCERT(3)
772
773       CURLOPT_PROXY_SSLCERT
774              Proxy client cert. See CURLOPT_PROXY_SSLCERT(3)
775
776       CURLOPT_SSLCERTTYPE
777              Client cert type.  See CURLOPT_SSLCERTTYPE(3)
778
779       CURLOPT_PROXY_SSLCERTTYPE
780              Proxy client cert type.  See CURLOPT_PROXY_SSLCERTTYPE(3)
781
782       CURLOPT_SSLKEY
783              Client key. See CURLOPT_SSLKEY(3)
784
785       CURLOPT_PROXY_SSLKEY
786              Proxy client key. See CURLOPT_PROXY_SSLKEY(3)
787
788       CURLOPT_SSLKEYTYPE
789              Client key type. See CURLOPT_SSLKEYTYPE(3)
790
791       CURLOPT_PROXY_SSLKEYTYPE
792              Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3)
793
794       CURLOPT_KEYPASSWD
795              Client key password. See CURLOPT_KEYPASSWD(3)
796
797       CURLOPT_PROXY_KEYPASSWD
798              Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3)
799
800       CURLOPT_SSL_ENABLE_ALPN
801              Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3)
802
803       CURLOPT_SSL_ENABLE_NPN
804              Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3)
805
806       CURLOPT_SSLENGINE
807              Use identifier with SSL engine. See CURLOPT_SSLENGINE(3)
808
809       CURLOPT_SSLENGINE_DEFAULT
810              Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3)
811
812       CURLOPT_SSL_FALSESTART
813              Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3)
814
815       CURLOPT_SSLVERSION
816              SSL version to use. See CURLOPT_SSLVERSION(3)
817
818       CURLOPT_PROXY_SSLVERSION
819              Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3)
820
821       CURLOPT_SSL_VERIFYHOST
822              Verify  the  host  name  in  the  SSL  certificate.   See   CUR‐
823              LOPT_SSL_VERIFYHOST(3)
824
825       CURLOPT_PROXY_SSL_VERIFYHOST
826              Verify  the  host  name  in  the proxy SSL certificate. See CUR‐
827              LOPT_PROXY_SSL_VERIFYHOST(3)
828
829       CURLOPT_SSL_VERIFYPEER
830              Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3)
831
832       CURLOPT_PROXY_SSL_VERIFYPEER
833              Verify the proxy SSL  certificate.  See  CURLOPT_PROXY_SSL_VERI‐
834              FYPEER(3)
835
836       CURLOPT_SSL_VERIFYSTATUS
837              Verify  the SSL certificate's status. See CURLOPT_SSL_VERIFYSTA‐
838              TUS(3)
839
840       CURLOPT_CAINFO
841              CA cert bundle. See CURLOPT_CAINFO(3)
842
843       CURLOPT_PROXY_CAINFO
844              Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3)
845
846       CURLOPT_ISSUERCERT
847              Issuer certificate. See CURLOPT_ISSUERCERT(3)
848
849       CURLOPT_CAPATH
850              Path to CA cert bundle. See CURLOPT_CAPATH(3)
851
852       CURLOPT_PROXY_CAPATH
853              Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3)
854
855       CURLOPT_CRLFILE
856              Certificate Revocation List. See CURLOPT_CRLFILE(3)
857
858       CURLOPT_PROXY_CRLFILE
859              Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3)
860
861       CURLOPT_CERTINFO
862              Extract certificate info. See CURLOPT_CERTINFO(3)
863
864       CURLOPT_PINNEDPUBLICKEY
865              Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3)
866
867       CURLOPT_PROXY_PINNEDPUBLICKEY
868              Set the proxy's pinned SSL public key. See CURLOPT_PROXY_PINNED‐
869              PUBLICKEY(3)
870
871       CURLOPT_RANDOM_FILE
872              Provide   source  for  entropy  random  data.  See  CURLOPT_RAN‐
873              DOM_FILE(3)
874
875       CURLOPT_EGDSOCKET
876              Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3)
877
878       CURLOPT_SSL_CIPHER_LIST
879              Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3)
880
881       CURLOPT_PROXY_SSL_CIPHER_LIST
882              Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3)
883
884       CURLOPT_TLS13_CIPHERS
885              TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3)
886
887       CURLOPT_PROXY_TLS13_CIPHERS
888              Proxy   TLS   1.3   cipher   suites    to    use.    See    CUR‐
889              LOPT_PROXY_TLS13_CIPHERS(3)
890
891       CURLOPT_SSL_SESSIONID_CACHE
892              Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3)
893
894       CURLOPT_SSL_OPTIONS
895              Control SSL behavior. See CURLOPT_SSL_OPTIONS(3)
896
897       CURLOPT_PROXY_SSL_OPTIONS
898              Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3)
899
900       CURLOPT_KRBLEVEL
901              Kerberos security level. See CURLOPT_KRBLEVEL(3)
902
903       CURLOPT_GSSAPI_DELEGATION
904              Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3)
905

SSH OPTIONS

907       CURLOPT_SSH_AUTH_TYPES
908              SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
909
910       CURLOPT_SSH_COMPRESSION
911              Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
912
913       CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
914              MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
915
916       CURLOPT_SSH_PUBLIC_KEYFILE
917              File name of public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
918
919       CURLOPT_SSH_PRIVATE_KEYFILE
920              File name of private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
921
922       CURLOPT_SSH_KNOWNHOSTS
923              File name with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
924
925       CURLOPT_SSH_KEYFUNCTION
926              Callback  for  known  hosts  handling.  See CURLOPT_SSH_KEYFUNC‐
927              TION(3)
928
929       CURLOPT_SSH_KEYDATA
930              Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEY‐
931              DATA(3)
932

OTHER OPTIONS

934       CURLOPT_PRIVATE
935              Private pointer to store. See CURLOPT_PRIVATE(3)
936
937       CURLOPT_SHARE
938              Share object to use. See CURLOPT_SHARE(3)
939
940       CURLOPT_NEW_FILE_PERMS
941              Mode    for    creating    new    remote    files.    See   CUR‐
942              LOPT_NEW_FILE_PERMS(3)
943
944       CURLOPT_NEW_DIRECTORY_PERMS
945              Mode for creating new remote directories. See CURLOPT_NEW_DIREC‐
946              TORY_PERMS(3)
947

TELNET OPTIONS

949       CURLOPT_TELNETOPTIONS
950              TELNET options. See CURLOPT_TELNETOPTIONS(3)
951

RETURN VALUE

953       CURLE_OK  (zero) means that the option was set properly, non-zero means
954       an error occurred as <curl/curl.h> defines. See  the  libcurl-errors(3)
955       man page for the full list with descriptions.
956
957       If  you  try  to set an option that libcurl doesn't know about, perhaps
958       because the library is too old to support it or the option was  removed
959       in a recent version, this function will return CURLE_UNKNOWN_OPTION. If
960       support for the option was disabled at  compile-time,  it  will  return
961       CURLE_NOT_BUILT_IN.
962

EXAMPLE

964       CURL *curl = curl_easy_init();
965       if(curl) {
966         CURLcode res;
967         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
968         res = curl_easy_perform(curl);
969         curl_easy_cleanup(curl);
970       }
971

SEE ALSO

973       curl_easy_init(3),       curl_easy_cleanup(3),      curl_easy_reset(3),
974       curl_easy_getinfo(3), curl_multi_setopt(3),
975
976
977
978libcurl 7.66.0                  August 09, 2019            curl_easy_setopt(3)
Impressum