1curl_easy_setopt(3) libcurl Manual curl_easy_setopt(3)
2
3
4
6 curl_easy_setopt - set options for a curl easy handle
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
12
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
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
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
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
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
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
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
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
533 CURLOPT_MAIL_RCPT_ALLLOWFAILS
534 Allow RCPT TO command to fail for some recipients. See CUR‐
535 LOPT_MAIL_RCPT_ALLLOWFAILS(3)
536
538 CURLOPT_TFTP_BLKSIZE
539 TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
540
541 CURLOPT_TFTP_NO_OPTIONS
542 Do not send TFTP options requests. See CUR‐
543 LOPT_TFTP_NO_OPTIONS(3)
544
546 CURLOPT_FTPPORT
547 Use active FTP. See CURLOPT_FTPPORT(3)
548
549 CURLOPT_QUOTE
550 Commands to run before transfer. See CURLOPT_QUOTE(3)
551
552 CURLOPT_POSTQUOTE
553 Commands to run after transfer. See CURLOPT_POSTQUOTE(3)
554
555 CURLOPT_PREQUOTE
556 Commands to run just before transfer. See CURLOPT_PREQUOTE(3)
557
558 CURLOPT_APPEND
559 Append to remote file. See CURLOPT_APPEND(3)
560
561 CURLOPT_FTP_USE_EPRT
562 Use EPTR. See CURLOPT_FTP_USE_EPRT(3)
563
564 CURLOPT_FTP_USE_EPSV
565 Use EPSV. See CURLOPT_FTP_USE_EPSV(3)
566
567 CURLOPT_FTP_USE_PRET
568 Use PRET. See CURLOPT_FTP_USE_PRET(3)
569
570 CURLOPT_FTP_CREATE_MISSING_DIRS
571 Create missing directories on the remote server. See CUR‐
572 LOPT_FTP_CREATE_MISSING_DIRS(3)
573
574 CURLOPT_FTP_RESPONSE_TIMEOUT
575 Timeout for FTP responses. See CURLOPT_FTP_RESPONSE_TIMEOUT(3)
576
577 CURLOPT_FTP_ALTERNATIVE_TO_USER
578 Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
579
580 CURLOPT_FTP_SKIP_PASV_IP
581 Ignore the IP address in the PASV response. See CUR‐
582 LOPT_FTP_SKIP_PASV_IP(3)
583
584 CURLOPT_FTPSSLAUTH
585 Control how to do TLS. See CURLOPT_FTPSSLAUTH(3)
586
587 CURLOPT_FTP_SSL_CCC
588 Back to non-TLS again after authentication. See CUR‐
589 LOPT_FTP_SSL_CCC(3)
590
591 CURLOPT_FTP_ACCOUNT
592 Send ACCT command. See CURLOPT_FTP_ACCOUNT(3)
593
594 CURLOPT_FTP_FILEMETHOD
595 Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3)
596
598 CURLOPT_RTSP_REQUEST
599 RTSP request. See CURLOPT_RTSP_REQUEST(3)
600
601 CURLOPT_RTSP_SESSION_ID
602 RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
603
604 CURLOPT_RTSP_STREAM_URI
605 RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
606
607 CURLOPT_RTSP_TRANSPORT
608 RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
609
610 CURLOPT_RTSP_CLIENT_CSEQ
611 Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
612
613 CURLOPT_RTSP_SERVER_CSEQ
614 CSEQ number for RTSP Server->Client request. See CUR‐
615 LOPT_RTSP_SERVER_CSEQ(3)
616
618 CURLOPT_TRANSFERTEXT
619 Use text transfer. See CURLOPT_TRANSFERTEXT(3)
620
621 CURLOPT_PROXY_TRANSFER_MODE
622 Add transfer mode to URL over proxy. See CURLOPT_PROXY_TRANS‐
623 FER_MODE(3)
624
625 CURLOPT_CRLF
626 Convert newlines. See CURLOPT_CRLF(3)
627
628 CURLOPT_RANGE
629 Range requests. See CURLOPT_RANGE(3)
630
631 CURLOPT_RESUME_FROM
632 Resume a transfer. See CURLOPT_RESUME_FROM(3)
633
634 CURLOPT_RESUME_FROM_LARGE
635 Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3)
636
637 CURLOPT_CURLU
638 Set URL to work on with CURLU *. See CURLOPT_CURLU(3)
639
640 CURLOPT_CUSTOMREQUEST
641 Custom request/method. See CURLOPT_CUSTOMREQUEST(3)
642
643 CURLOPT_FILETIME
644 Request file modification date and time. See CURLOPT_FILETIME(3)
645
646 CURLOPT_DIRLISTONLY
647 List only. See CURLOPT_DIRLISTONLY(3)
648
649 CURLOPT_NOBODY
650 Do not get the body contents. See CURLOPT_NOBODY(3)
651
652 CURLOPT_INFILESIZE
653 Size of file to send. CURLOPT_INFILESIZE(3)
654
655 CURLOPT_INFILESIZE_LARGE
656 Size of file to send. CURLOPT_INFILESIZE_LARGE(3)
657
658 CURLOPT_UPLOAD
659 Upload data. See CURLOPT_UPLOAD(3)
660
661 CURLOPT_UPLOAD_BUFFERSIZE
662 Set upload buffer size. See CURLOPT_UPLOAD_BUFFERSIZE(3)
663
664 CURLOPT_MIMEPOST
665 Post/send MIME data. See CURLOPT_MIMEPOST(3)
666
667 CURLOPT_MAXFILESIZE
668 Maximum file size to get. See CURLOPT_MAXFILESIZE(3)
669
670 CURLOPT_MAXFILESIZE_LARGE
671 Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3)
672
673 CURLOPT_TIMECONDITION
674 Make a time conditional request. See CURLOPT_TIMECONDITION(3)
675
676 CURLOPT_TIMEVALUE
677 Time value for the time conditional request. See CUR‐
678 LOPT_TIMEVALUE(3)
679
680 CURLOPT_TIMEVALUE_LARGE
681 Time value for the time conditional request. See CUR‐
682 LOPT_TIMEVALUE_LARGE(3)
683
685 CURLOPT_TIMEOUT
686 Timeout for the entire request. See CURLOPT_TIMEOUT(3)
687
688 CURLOPT_TIMEOUT_MS
689 Millisecond timeout for the entire request. See CURLOPT_TIME‐
690 OUT_MS(3)
691
692 CURLOPT_LOW_SPEED_LIMIT
693 Low speed limit to abort transfer. See CUR‐
694 LOPT_LOW_SPEED_LIMIT(3)
695
696 CURLOPT_LOW_SPEED_TIME
697 Time to be below the speed to trigger low speed abort. See CUR‐
698 LOPT_LOW_SPEED_TIME(3)
699
700 CURLOPT_MAX_SEND_SPEED_LARGE
701 Cap the upload speed to this. See CUR‐
702 LOPT_MAX_SEND_SPEED_LARGE(3)
703
704 CURLOPT_MAX_RECV_SPEED_LARGE
705 Cap the download speed to this. See CUR‐
706 LOPT_MAX_RECV_SPEED_LARGE(3)
707
708 CURLOPT_MAXCONNECTS
709 Maximum number of connections in the connection pool. See CUR‐
710 LOPT_MAXCONNECTS(3)
711
712 CURLOPT_FRESH_CONNECT
713 Use a new connection. CURLOPT_FRESH_CONNECT(3)
714
715 CURLOPT_FORBID_REUSE
716 Prevent subsequent connections from re-using this. See CUR‐
717 LOPT_FORBID_REUSE(3)
718
719 CURLOPT_MAXAGE_CONN
720 Limit the age of connections for reuse. See CURLOPT_MAX‐
721 AGE_CONN(3)
722
723 CURLOPT_CONNECTTIMEOUT
724 Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3)
725
726 CURLOPT_CONNECTTIMEOUT_MS
727 Millisecond timeout for the connection phase. See CURLOPT_CON‐
728 NECTTIMEOUT_MS(3)
729
730 CURLOPT_IPRESOLVE
731 IP version to resolve to. See CURLOPT_IPRESOLVE(3)
732
733 CURLOPT_CONNECT_ONLY
734 Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3)
735
736 CURLOPT_USE_SSL
737 Use TLS/SSL. See CURLOPT_USE_SSL(3)
738
739 CURLOPT_RESOLVE
740 Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3)
741
742 CURLOPT_DNS_INTERFACE
743 Bind name resolves to this interface. See CURLOPT_DNS_INTER‐
744 FACE(3)
745
746 CURLOPT_DNS_LOCAL_IP4
747 Bind name resolves to this IP4 address. See CUR‐
748 LOPT_DNS_LOCAL_IP4(3)
749
750 CURLOPT_DNS_LOCAL_IP6
751 Bind name resolves to this IP6 address. See CUR‐
752 LOPT_DNS_LOCAL_IP6(3)
753
754 CURLOPT_DNS_SERVERS
755 Preferred DNS servers. See CURLOPT_DNS_SERVERS(3)
756
757 CURLOPT_DNS_SHUFFLE_ADDRESSES
758 Shuffle addresses before use. See CURLOPT_DNS_SHUF‐
759 FLE_ADDRESSES(3)
760
761 CURLOPT_ACCEPTTIMEOUT_MS
762 Timeout for waiting for the server's connect back to be
763 accepted. See CURLOPT_ACCEPTTIMEOUT_MS(3)
764
765 CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
766 Timeout for happy eyeballs. See CURLOPT_HAPPY_EYEBALLS_TIME‐
767 OUT_MS(3)
768
769 CURLOPT_UPKEEP_INTERVAL_MS
770 Sets the interval at which connection upkeep are performed. See
771 CURLOPT_UPKEEP_INTERVAL_MS(3)
772
774 CURLOPT_SSLCERT
775 Client cert. See CURLOPT_SSLCERT(3)
776
777 CURLOPT_PROXY_SSLCERT
778 Proxy client cert. See CURLOPT_PROXY_SSLCERT(3)
779
780 CURLOPT_SSLCERTTYPE
781 Client cert type. See CURLOPT_SSLCERTTYPE(3)
782
783 CURLOPT_PROXY_SSLCERTTYPE
784 Proxy client cert type. See CURLOPT_PROXY_SSLCERTTYPE(3)
785
786 CURLOPT_SSLKEY
787 Client key. See CURLOPT_SSLKEY(3)
788
789 CURLOPT_PROXY_SSLKEY
790 Proxy client key. See CURLOPT_PROXY_SSLKEY(3)
791
792 CURLOPT_SSLKEYTYPE
793 Client key type. See CURLOPT_SSLKEYTYPE(3)
794
795 CURLOPT_PROXY_SSLKEYTYPE
796 Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3)
797
798 CURLOPT_KEYPASSWD
799 Client key password. See CURLOPT_KEYPASSWD(3)
800
801 CURLOPT_PROXY_KEYPASSWD
802 Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3)
803
804 CURLOPT_SSL_ENABLE_ALPN
805 Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3)
806
807 CURLOPT_SSL_ENABLE_NPN
808 Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3)
809
810 CURLOPT_SSLENGINE
811 Use identifier with SSL engine. See CURLOPT_SSLENGINE(3)
812
813 CURLOPT_SSLENGINE_DEFAULT
814 Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3)
815
816 CURLOPT_SSL_FALSESTART
817 Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3)
818
819 CURLOPT_SSLVERSION
820 SSL version to use. See CURLOPT_SSLVERSION(3)
821
822 CURLOPT_PROXY_SSLVERSION
823 Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3)
824
825 CURLOPT_SSL_VERIFYHOST
826 Verify the host name in the SSL certificate. See CUR‐
827 LOPT_SSL_VERIFYHOST(3)
828
829 CURLOPT_PROXY_SSL_VERIFYHOST
830 Verify the host name in the proxy SSL certificate. See CUR‐
831 LOPT_PROXY_SSL_VERIFYHOST(3)
832
833 CURLOPT_SSL_VERIFYPEER
834 Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3)
835
836 CURLOPT_PROXY_SSL_VERIFYPEER
837 Verify the proxy SSL certificate. See CURLOPT_PROXY_SSL_VERI‐
838 FYPEER(3)
839
840 CURLOPT_SSL_VERIFYSTATUS
841 Verify the SSL certificate's status. See CURLOPT_SSL_VERIFYSTA‐
842 TUS(3)
843
844 CURLOPT_CAINFO
845 CA cert bundle. See CURLOPT_CAINFO(3)
846
847 CURLOPT_PROXY_CAINFO
848 Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3)
849
850 CURLOPT_ISSUERCERT
851 Issuer certificate. See CURLOPT_ISSUERCERT(3)
852
853 CURLOPT_CAPATH
854 Path to CA cert bundle. See CURLOPT_CAPATH(3)
855
856 CURLOPT_PROXY_CAPATH
857 Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3)
858
859 CURLOPT_CRLFILE
860 Certificate Revocation List. See CURLOPT_CRLFILE(3)
861
862 CURLOPT_PROXY_CRLFILE
863 Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3)
864
865 CURLOPT_CERTINFO
866 Extract certificate info. See CURLOPT_CERTINFO(3)
867
868 CURLOPT_PINNEDPUBLICKEY
869 Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3)
870
871 CURLOPT_PROXY_PINNEDPUBLICKEY
872 Set the proxy's pinned SSL public key. See CURLOPT_PROXY_PINNED‐
873 PUBLICKEY(3)
874
875 CURLOPT_RANDOM_FILE
876 Provide source for entropy random data. See CURLOPT_RAN‐
877 DOM_FILE(3)
878
879 CURLOPT_EGDSOCKET
880 Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3)
881
882 CURLOPT_SSL_CIPHER_LIST
883 Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3)
884
885 CURLOPT_PROXY_SSL_CIPHER_LIST
886 Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3)
887
888 CURLOPT_TLS13_CIPHERS
889 TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3)
890
891 CURLOPT_PROXY_TLS13_CIPHERS
892 Proxy TLS 1.3 cipher suites to use. See CUR‐
893 LOPT_PROXY_TLS13_CIPHERS(3)
894
895 CURLOPT_SSL_SESSIONID_CACHE
896 Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3)
897
898 CURLOPT_SSL_OPTIONS
899 Control SSL behavior. See CURLOPT_SSL_OPTIONS(3)
900
901 CURLOPT_PROXY_SSL_OPTIONS
902 Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3)
903
904 CURLOPT_KRBLEVEL
905 Kerberos security level. See CURLOPT_KRBLEVEL(3)
906
907 CURLOPT_GSSAPI_DELEGATION
908 Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3)
909
911 CURLOPT_SSH_AUTH_TYPES
912 SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
913
914 CURLOPT_SSH_COMPRESSION
915 Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
916
917 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
918 MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
919
920 CURLOPT_SSH_PUBLIC_KEYFILE
921 File name of public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
922
923 CURLOPT_SSH_PRIVATE_KEYFILE
924 File name of private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
925
926 CURLOPT_SSH_KNOWNHOSTS
927 File name with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
928
929 CURLOPT_SSH_KEYFUNCTION
930 Callback for known hosts handling. See CURLOPT_SSH_KEYFUNC‐
931 TION(3)
932
933 CURLOPT_SSH_KEYDATA
934 Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEY‐
935 DATA(3)
936
938 CURLOPT_PRIVATE
939 Private pointer to store. See CURLOPT_PRIVATE(3)
940
941 CURLOPT_SHARE
942 Share object to use. See CURLOPT_SHARE(3)
943
944 CURLOPT_NEW_FILE_PERMS
945 Mode for creating new remote files. See CUR‐
946 LOPT_NEW_FILE_PERMS(3)
947
948 CURLOPT_NEW_DIRECTORY_PERMS
949 Mode for creating new remote directories. See CURLOPT_NEW_DIREC‐
950 TORY_PERMS(3)
951
953 CURLOPT_TELNETOPTIONS
954 TELNET options. See CURLOPT_TELNETOPTIONS(3)
955
957 CURLE_OK (zero) means that the option was set properly, non-zero means
958 an error occurred as <curl/curl.h> defines. See the libcurl-errors(3)
959 man page for the full list with descriptions.
960
961 Strings passed on to libcurl must be shorter than 8000000 bytes, other‐
962 wise curl_easy_setopt(3) returns CURLE_BAD_FUNCTION_ARGUMENT (added in
963 7.65.0).
964
965 If you try to set an option that libcurl doesn't know about, perhaps
966 because the library is too old to support it or the option was removed
967 in a recent version, this function will return CURLE_UNKNOWN_OPTION. If
968 support for the option was disabled at compile-time, it will return
969 CURLE_NOT_BUILT_IN.
970
972 CURL *curl = curl_easy_init();
973 if(curl) {
974 CURLcode res;
975 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
976 res = curl_easy_perform(curl);
977 curl_easy_cleanup(curl);
978 }
979
981 curl_easy_init(3), curl_easy_cleanup(3), curl_easy_reset(3),
982 curl_easy_getinfo(3), curl_multi_setopt(3),
983
984
985
986libcurl 7.69.1 January 14, 2020 curl_easy_setopt(3)