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_IR
378              Enable SASL initial response. See CURLOPT_SASL_IR(3)
379
380       CURLOPT_XOAUTH2_BEARER
381              OAuth2 bearer token. See CURLOPT_XOAUTH2_BEARER(3)
382
383       CURLOPT_DISALLOW_USERNAME_IN_URL
384              Don't  allow  username  in   URL.   See   CURLOPT_DISALLOW_USER‐
385              NAME_IN_URL(3)
386

HTTP OPTIONS

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

SMTP OPTIONS

513       CURLOPT_MAIL_FROM
514              Address of the sender. See CURLOPT_MAIL_FROM(3)
515
516       CURLOPT_MAIL_RCPT
517              Address of the recipients. See CURLOPT_MAIL_RCPT(3)
518
519       CURLOPT_MAIL_AUTH
520              Authentication address. See CURLOPT_MAIL_AUTH(3)
521

TFTP OPTIONS

523       CURLOPT_TFTP_BLKSIZE
524              TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
525
526       CURLOPT_TFTP_NO_OPTIONS
527              Do    not    send    TFTP    options    requests.    See    CUR‐
528              LOPT_TFTP_NO_OPTIONS(3)
529

FTP OPTIONS

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

RTSP OPTIONS

583       CURLOPT_RTSP_REQUEST
584              RTSP request. See CURLOPT_RTSP_REQUEST(3)
585
586       CURLOPT_RTSP_SESSION_ID
587              RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
588
589       CURLOPT_RTSP_STREAM_URI
590              RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
591
592       CURLOPT_RTSP_TRANSPORT
593              RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
594
595       CURLOPT_RTSP_CLIENT_CSEQ
596              Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
597
598       CURLOPT_RTSP_SERVER_CSEQ
599              CSEQ  number  for  RTSP   Server->Client   request.   See   CUR‐
600              LOPT_RTSP_SERVER_CSEQ(3)
601

PROTOCOL OPTIONS

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

CONNECTION OPTIONS

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

SSL and SECURITY OPTIONS

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

SSH OPTIONS

892       CURLOPT_SSH_AUTH_TYPES
893              SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
894
895       CURLOPT_SSH_COMPRESSION
896              Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
897
898       CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
899              MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
900
901       CURLOPT_SSH_PUBLIC_KEYFILE
902              File name of public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
903
904       CURLOPT_SSH_PRIVATE_KEYFILE
905              File name of private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
906
907       CURLOPT_SSH_KNOWNHOSTS
908              File name with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
909
910       CURLOPT_SSH_KEYFUNCTION
911              Callback for  known  hosts  handling.  See  CURLOPT_SSH_KEYFUNC‐
912              TION(3)
913
914       CURLOPT_SSH_KEYDATA
915              Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEY‐
916              DATA(3)
917

OTHER OPTIONS

919       CURLOPT_PRIVATE
920              Private pointer to store. See CURLOPT_PRIVATE(3)
921
922       CURLOPT_SHARE
923              Share object to use. See CURLOPT_SHARE(3)
924
925       CURLOPT_NEW_FILE_PERMS
926              Mode   for    creating    new    remote    files.    See    CUR‐
927              LOPT_NEW_FILE_PERMS(3)
928
929       CURLOPT_NEW_DIRECTORY_PERMS
930              Mode for creating new remote directories. See CURLOPT_NEW_DIREC‐
931              TORY_PERMS(3)
932

TELNET OPTIONS

934       CURLOPT_TELNETOPTIONS
935              TELNET options. See CURLOPT_TELNETOPTIONS(3)
936

RETURN VALUE

938       CURLE_OK (zero) means that the option was set properly, non-zero  means
939       an  error  occurred as <curl/curl.h> defines. See the libcurl-errors(3)
940       man page for the full list with descriptions.
941
942       If you try to set an option that libcurl doesn't  know  about,  perhaps
943       because  the library is too old to support it or the option was removed
944       in a recent version, this function will return CURLE_UNKNOWN_OPTION. If
945       support  for  the  option  was disabled at compile-time, it will return
946       CURLE_NOT_BUILT_IN.
947

EXAMPLE

949       CURL *curl = curl_easy_init();
950       if(curl) {
951         CURLcode res;
952         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
953         res = curl_easy_perform(curl);
954         curl_easy_cleanup(curl);
955       }
956

SEE ALSO

958       curl_easy_init(3),      curl_easy_cleanup(3),       curl_easy_reset(3),
959       curl_easy_getinfo(3), curl_multi_setopt(3),
960
961
962
963libcurl 7.64.0                 December 17, 2018           curl_easy_setopt(3)
Impressum