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_BUFFERSIZE
289              Ask for alternate buffer size. See CURLOPT_BUFFERSIZE(3)
290
291       CURLOPT_PORT
292              Port number to connect to. See CURLOPT_PORT(3)
293
294       CURLOPT_TCP_FASTOPEN
295              Enable TFO, TCP Fast Open. See CURLOPT_TCP_FASTOPEN(3)
296
297       CURLOPT_TCP_NODELAY
298              Disable the Nagle algorithm. See CURLOPT_TCP_NODELAY(3)
299
300       CURLOPT_ADDRESS_SCOPE
301              IPv6 scope for local addresses. See CURLOPT_ADDRESS_SCOPE(3)
302
303       CURLOPT_TCP_KEEPALIVE
304              Enable TCP keep-alive. See CURLOPT_TCP_KEEPALIVE(3)
305
306       CURLOPT_TCP_KEEPIDLE
307              Idle time before sending keep-alive. See CURLOPT_TCP_KEEPIDLE(3)
308
309       CURLOPT_TCP_KEEPINTVL
310              Interval between keep-alive probes. See CURLOPT_TCP_KEEPINTVL(3)
311
312       CURLOPT_UNIX_SOCKET_PATH
313              Path to a Unix domain socket. See CURLOPT_UNIX_SOCKET_PATH(3)
314
315       CURLOPT_ABSTRACT_UNIX_SOCKET
316              Path   to   an   abstract   Unix   domain   socket.   See   CUR‐
317              LOPT_ABSTRACT_UNIX_SOCKET(3)
318

NAMES and PASSWORDS OPTIONS (Authentication)

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

HTTP OPTIONS

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

SMTP OPTIONS

499       CURLOPT_MAIL_FROM
500              Address of the sender. See CURLOPT_MAIL_FROM(3)
501
502       CURLOPT_MAIL_RCPT
503              Address of the recipients. See CURLOPT_MAIL_RCPT(3)
504
505       CURLOPT_MAIL_AUTH
506              Authentication address. See CURLOPT_MAIL_AUTH(3)
507

TFTP OPTIONS

509       CURLOPT_TFTP_BLKSIZE
510              TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
511
512       CURLOPT_TFTP_NO_OPTIONS
513              Do    not    send    TFTP    options    requests.    See    CUR‐
514              LOPT_TFTP_NO_OPTIONS(3)
515

FTP OPTIONS

517       CURLOPT_FTPPORT
518              Use active FTP. See CURLOPT_FTPPORT(3)
519
520       CURLOPT_QUOTE
521              Commands to run before transfer. See CURLOPT_QUOTE(3)
522
523       CURLOPT_POSTQUOTE
524              Commands to run after transfer. See CURLOPT_POSTQUOTE(3)
525
526       CURLOPT_PREQUOTE
527              Commands to run just before transfer. See CURLOPT_PREQUOTE(3)
528
529       CURLOPT_APPEND
530              Append to remote file. See CURLOPT_APPEND(3)
531
532       CURLOPT_FTP_USE_EPRT
533              Use EPTR. See CURLOPT_FTP_USE_EPRT(3)
534
535       CURLOPT_FTP_USE_EPSV
536              Use EPSV. See CURLOPT_FTP_USE_EPSV(3)
537
538       CURLOPT_FTP_USE_PRET
539              Use PRET. See CURLOPT_FTP_USE_PRET(3)
540
541       CURLOPT_FTP_CREATE_MISSING_DIRS
542              Create  missing  directories  on  the  remote  server.  See CUR‐
543              LOPT_FTP_CREATE_MISSING_DIRS(3)
544
545       CURLOPT_FTP_RESPONSE_TIMEOUT
546              Timeout for FTP responses. See CURLOPT_FTP_RESPONSE_TIMEOUT(3)
547
548       CURLOPT_FTP_ALTERNATIVE_TO_USER
549              Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
550
551       CURLOPT_FTP_SKIP_PASV_IP
552              Ignore  the  IP  address  in  the  PASV   response.   See   CUR‐
553              LOPT_FTP_SKIP_PASV_IP(3)
554
555       CURLOPT_FTPSSLAUTH
556              Control how to do TLS. See CURLOPT_FTPSSLAUTH(3)
557
558       CURLOPT_FTP_SSL_CCC
559              Back   to   non-TLS   again   after   authentication.  See  CUR‐
560              LOPT_FTP_SSL_CCC(3)
561
562       CURLOPT_FTP_ACCOUNT
563              Send ACCT command. See CURLOPT_FTP_ACCOUNT(3)
564
565       CURLOPT_FTP_FILEMETHOD
566              Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3)
567

RTSP OPTIONS

569       CURLOPT_RTSP_REQUEST
570              RTSP request. See CURLOPT_RTSP_REQUEST(3)
571
572       CURLOPT_RTSP_SESSION_ID
573              RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
574
575       CURLOPT_RTSP_STREAM_URI
576              RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
577
578       CURLOPT_RTSP_TRANSPORT
579              RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
580
581       CURLOPT_RTSP_CLIENT_CSEQ
582              Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
583
584       CURLOPT_RTSP_SERVER_CSEQ
585              CSEQ  number  for  RTSP   Server->Client   request.   See   CUR‐
586              LOPT_RTSP_SERVER_CSEQ(3)
587

PROTOCOL OPTIONS

589       CURLOPT_TRANSFERTEXT
590              Use text transfer. See CURLOPT_TRANSFERTEXT(3)
591
592       CURLOPT_PROXY_TRANSFER_MODE
593              Add  transfer  mode  to URL over proxy. See CURLOPT_PROXY_TRANS‐
594              FER_MODE(3)
595
596       CURLOPT_CRLF
597              Convert newlines. See CURLOPT_CRLF(3)
598
599       CURLOPT_RANGE
600              Range requests. See CURLOPT_RANGE(3)
601
602       CURLOPT_RESUME_FROM
603              Resume a transfer. See CURLOPT_RESUME_FROM(3)
604
605       CURLOPT_RESUME_FROM_LARGE
606              Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3)
607
608       CURLOPT_CUSTOMREQUEST
609              Custom request/method. See CURLOPT_CUSTOMREQUEST(3)
610
611       CURLOPT_FILETIME
612              Request file modification date and time. See CURLOPT_FILETIME(3)
613
614       CURLOPT_DIRLISTONLY
615              List only. See CURLOPT_DIRLISTONLY(3)
616
617       CURLOPT_NOBODY
618              Do not get the body contents. See CURLOPT_NOBODY(3)
619
620       CURLOPT_INFILESIZE
621              Size of file to send. CURLOPT_INFILESIZE(3)
622
623       CURLOPT_INFILESIZE_LARGE
624              Size of file to send. CURLOPT_INFILESIZE_LARGE(3)
625
626       CURLOPT_UPLOAD
627              Upload data. See CURLOPT_UPLOAD(3)
628
629       CURLOPT_MIMEPOST
630              Post/send MIME data. See CURLOPT_MIMEPOST(3)
631
632       CURLOPT_MAXFILESIZE
633              Maximum file size to get. See CURLOPT_MAXFILESIZE(3)
634
635       CURLOPT_MAXFILESIZE_LARGE
636              Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3)
637
638       CURLOPT_TIMECONDITION
639              Make a time conditional request. See CURLOPT_TIMECONDITION(3)
640
641       CURLOPT_TIMEVALUE
642              Time  value  for  the  time  conditional   request.   See   CUR‐
643              LOPT_TIMEVALUE(3)
644
645       CURLOPT_TIMEVALUE_LARGE
646              Time   value   for   the  time  conditional  request.  See  CUR‐
647              LOPT_TIMEVALUE_LARGE(3)
648

CONNECTION OPTIONS

650       CURLOPT_TIMEOUT
651              Timeout for the entire request. See CURLOPT_TIMEOUT(3)
652
653       CURLOPT_TIMEOUT_MS
654              Millisecond timeout for the entire  request.  See  CURLOPT_TIME‐
655              OUT_MS(3)
656
657       CURLOPT_LOW_SPEED_LIMIT
658              Low    speed    limit    to    abort    transfer.    See    CUR‐
659              LOPT_LOW_SPEED_LIMIT(3)
660
661       CURLOPT_LOW_SPEED_TIME
662              Time to be below the speed to trigger low speed abort. See  CUR‐
663              LOPT_LOW_SPEED_TIME(3)
664
665       CURLOPT_MAX_SEND_SPEED_LARGE
666              Cap     the     upload     speed     to     this.    See    CUR‐
667              LOPT_MAX_SEND_SPEED_LARGE(3)
668
669       CURLOPT_MAX_RECV_SPEED_LARGE
670              Cap    the    download    speed    to     this.     See     CUR‐
671              LOPT_MAX_RECV_SPEED_LARGE(3)
672
673       CURLOPT_MAXCONNECTS
674              Maximum  number  of connections in the connection pool. See CUR‐
675              LOPT_MAXCONNECTS(3)
676
677       CURLOPT_FRESH_CONNECT
678              Use a new connection. CURLOPT_FRESH_CONNECT(3)
679
680       CURLOPT_FORBID_REUSE
681              Prevent subsequent connections  from  re-using  this.  See  CUR‐
682              LOPT_FORBID_REUSE(3)
683
684       CURLOPT_CONNECTTIMEOUT
685              Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3)
686
687       CURLOPT_CONNECTTIMEOUT_MS
688              Millisecond  timeout  for the connection phase. See CURLOPT_CON‐
689              NECTTIMEOUT_MS(3)
690
691       CURLOPT_IPRESOLVE
692              IP version to resolve to. See CURLOPT_IPRESOLVE(3)
693
694       CURLOPT_CONNECT_ONLY
695              Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3)
696
697       CURLOPT_USE_SSL
698              Use TLS/SSL. See CURLOPT_USE_SSL(3)
699
700       CURLOPT_RESOLVE
701              Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3)
702
703       CURLOPT_DNS_INTERFACE
704              Bind name resolves to  this  interface.  See  CURLOPT_DNS_INTER‐
705              FACE(3)
706
707       CURLOPT_DNS_LOCAL_IP4
708              Bind   name   resolves   to   this   IP4   address.   See   CUR‐
709              LOPT_DNS_LOCAL_IP4(3)
710
711       CURLOPT_DNS_LOCAL_IP6
712              Bind   name   resolves   to   this   IP6   address.   See   CUR‐
713              LOPT_DNS_LOCAL_IP6(3)
714
715       CURLOPT_DNS_SERVERS
716              Preferred DNS servers. See CURLOPT_DNS_SERVERS(3)
717
718       CURLOPT_DNS_SHUFFLE_ADDRESSES
719              Shuffle    addresses    before    use.   See   CURLOPT_DNS_SHUF‐
720              FLE_ADDRESSES(3)
721
722       CURLOPT_ACCEPTTIMEOUT_MS
723              Timeout  for  waiting  for  the  server's  connect  back  to  be
724              accepted. See CURLOPT_ACCEPTTIMEOUT_MS(3)
725
726       CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
727              Timeout  for  happy  eyeballs.  See CURLOPT_HAPPY_EYEBALLS_TIME‐
728              OUT_MS(3)
729

SSL and SECURITY OPTIONS

731       CURLOPT_SSLCERT
732              Client cert. See CURLOPT_SSLCERT(3)
733
734       CURLOPT_PROXY_SSLCERT
735              Proxy client cert. See CURLOPT_PROXY_SSLCERT(3)
736
737       CURLOPT_SSLCERTTYPE
738              Client cert type.  See CURLOPT_SSLCERTTYPE(3)
739
740       CURLOPT_PROXY_SSLCERTTYPE
741              Proxy client cert type.  See CURLOPT_PROXY_SSLCERTTYPE(3)
742
743       CURLOPT_SSLKEY
744              Client key. See CURLOPT_SSLKEY(3)
745
746       CURLOPT_PROXY_SSLKEY
747              Proxy client key. See CURLOPT_PROXY_SSLKEY(3)
748
749       CURLOPT_SSLKEYTYPE
750              Client key type. See CURLOPT_SSLKEYTYPE(3)
751
752       CURLOPT_PROXY_SSLKEYTYPE
753              Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3)
754
755       CURLOPT_KEYPASSWD
756              Client key password. See CURLOPT_KEYPASSWD(3)
757
758       CURLOPT_PROXY_KEYPASSWD
759              Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3)
760
761       CURLOPT_SSL_ENABLE_ALPN
762              Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3)
763
764       CURLOPT_SSL_ENABLE_NPN
765              Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3)
766
767       CURLOPT_SSLENGINE
768              Use identifier with SSL engine. See CURLOPT_SSLENGINE(3)
769
770       CURLOPT_SSLENGINE_DEFAULT
771              Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3)
772
773       CURLOPT_SSL_FALSESTART
774              Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3)
775
776       CURLOPT_SSLVERSION
777              SSL version to use. See CURLOPT_SSLVERSION(3)
778
779       CURLOPT_PROXY_SSLVERSION
780              Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3)
781
782       CURLOPT_SSL_VERIFYHOST
783              Verify  the  host  name  in  the  SSL  certificate.   See   CUR‐
784              LOPT_SSL_VERIFYHOST(3)
785
786       CURLOPT_PROXY_SSL_VERIFYHOST
787              Verify  the  host  name  in  the proxy SSL certificate. See CUR‐
788              LOPT_PROXY_SSL_VERIFYHOST(3)
789
790       CURLOPT_SSL_VERIFYPEER
791              Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3)
792
793       CURLOPT_PROXY_SSL_VERIFYPEER
794              Verify the proxy SSL  certificate.  See  CURLOPT_PROXY_SSL_VERI‐
795              FYPEER(3)
796
797       CURLOPT_SSL_VERIFYSTATUS
798              Verify  the SSL certificate's status. See CURLOPT_SSL_VERIFYSTA‐
799              TUS(3)
800
801       CURLOPT_CAINFO
802              CA cert bundle. See CURLOPT_CAINFO(3)
803
804       CURLOPT_PROXY_CAINFO
805              Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3)
806
807       CURLOPT_ISSUERCERT
808              Issuer certificate. See CURLOPT_ISSUERCERT(3)
809
810       CURLOPT_CAPATH
811              Path to CA cert bundle. See CURLOPT_CAPATH(3)
812
813       CURLOPT_PROXY_CAPATH
814              Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3)
815
816       CURLOPT_CRLFILE
817              Certificate Revocation List. See CURLOPT_CRLFILE(3)
818
819       CURLOPT_PROXY_CRLFILE
820              Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3)
821
822       CURLOPT_CERTINFO
823              Extract certificate info. See CURLOPT_CERTINFO(3)
824
825       CURLOPT_PINNEDPUBLICKEY
826              Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3)
827
828       CURLOPT_PROXY_PINNEDPUBLICKEY
829              Set the proxy's pinned SSL public key. See CURLOPT_PROXY_PINNED‐
830              PUBLICKEY(3)
831
832       CURLOPT_RANDOM_FILE
833              Provide   source  for  entropy  random  data.  See  CURLOPT_RAN‐
834              DOM_FILE(3)
835
836       CURLOPT_EGDSOCKET
837              Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3)
838
839       CURLOPT_SSL_CIPHER_LIST
840              Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3)
841
842       CURLOPT_PROXY_SSL_CIPHER_LIST
843              Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3)
844
845       CURLOPT_TLS13_CIPHERS
846              TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3)
847
848       CURLOPT_PROXY_TLS13_CIPHERS
849              Proxy   TLS   1.3   cipher   suites    to    use.    See    CUR‐
850              LOPT_PROXY_TLS13_CIPHERS(3)
851
852       CURLOPT_SSL_SESSIONID_CACHE
853              Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3)
854
855       CURLOPT_SSL_OPTIONS
856              Control SSL behavior. See CURLOPT_SSL_OPTIONS(3)
857
858       CURLOPT_PROXY_SSL_OPTIONS
859              Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3)
860
861       CURLOPT_KRBLEVEL
862              Kerberos security level. See CURLOPT_KRBLEVEL(3)
863
864       CURLOPT_GSSAPI_DELEGATION
865              Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3)
866

SSH OPTIONS

868       CURLOPT_SSH_AUTH_TYPES
869              SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
870
871       CURLOPT_SSH_COMPRESSION
872              Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
873
874       CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
875              MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
876
877       CURLOPT_SSH_PUBLIC_KEYFILE
878              File name of public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
879
880       CURLOPT_SSH_PRIVATE_KEYFILE
881              File name of private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
882
883       CURLOPT_SSH_KNOWNHOSTS
884              File name with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
885
886       CURLOPT_SSH_KEYFUNCTION
887              Callback  for  known  hosts  handling.  See CURLOPT_SSH_KEYFUNC‐
888              TION(3)
889
890       CURLOPT_SSH_KEYDATA
891              Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEY‐
892              DATA(3)
893

OTHER OPTIONS

895       CURLOPT_PRIVATE
896              Private pointer to store. See CURLOPT_PRIVATE(3)
897
898       CURLOPT_SHARE
899              Share object to use. See CURLOPT_SHARE(3)
900
901       CURLOPT_NEW_FILE_PERMS
902              Mode    for    creating    new    remote    files.    See   CUR‐
903              LOPT_NEW_FILE_PERMS(3)
904
905       CURLOPT_NEW_DIRECTORY_PERMS
906              Mode for creating new remote directories. See CURLOPT_NEW_DIREC‐
907              TORY_PERMS(3)
908

TELNET OPTIONS

910       CURLOPT_TELNETOPTIONS
911              TELNET options. See CURLOPT_TELNETOPTIONS(3)
912

RETURN VALUE

914       CURLE_OK  (zero) means that the option was set properly, non-zero means
915       an error occurred as <curl/curl.h> defines. See  the  libcurl-errors(3)
916       man page for the full list with descriptions.
917
918       If  you  try  to set an option that libcurl doesn't know about, perhaps
919       because the library is too old to support it or the option was  removed
920       in a recent version, this function will return CURLE_UNKNOWN_OPTION. If
921       support for the option was disabled at  compile-time,  it  will  return
922       CURLE_NOT_BUILT_IN.
923

EXAMPLE

925       CURL *curl = curl_easy_init();
926       if(curl) {
927         CURLcode res;
928         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
929         res = curl_easy_perform(curl);
930         curl_easy_cleanup(curl);
931       }
932

SEE ALSO

934       curl_easy_init(3),       curl_easy_cleanup(3),      curl_easy_reset(3),
935       curl_easy_getinfo(3), curl_multi_setopt(3),
936
937
938
939libcurl 7.61.1                 February 25, 2018           curl_easy_setopt(3)
Impressum