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 op‐
27 tionally reset all options back to internal default with curl_easy_re‐
28 set(3).
29
30 Strings passed to libcurl as 'char *' arguments, are copied by the li‐
31 brary; the string storage associated to the pointer argument may be
32 discarded or reused after curl_easy_setopt(3) returns. The only excep‐
33 tion to this rule is really CURLOPT_POSTFIELDS(3), but the alternative
34 that copies the string CURLOPT_COPYPOSTFIELDS(3) has some usage charac‐
35 teristics you need to read up on. This function does not accept input
36 strings longer than CURL_MAX_INPUT_LENGTH (8 MB).
37
38 The order in which the options are set does not matter.
39
40 Before version 7.17.0, strings were not copied. Instead the user was
41 forced keep them available until libcurl no longer needed them.
42
43 The handle is the return code from a curl_easy_init(3) or
44 curl_easy_duphandle(3) call.
45
47 CURLOPT_VERBOSE
48 Display verbose information. See CURLOPT_VERBOSE(3)
49
50 CURLOPT_HEADER
51 Include the header in the body output. See CURLOPT_HEADER(3)
52
53 CURLOPT_NOPROGRESS
54 Shut off the progress meter. See CURLOPT_NOPROGRESS(3)
55
56 CURLOPT_NOSIGNAL
57 Do not install signal handlers. See CURLOPT_NOSIGNAL(3)
58
59 CURLOPT_WILDCARDMATCH
60 Transfer multiple files according to a file name pattern. See
61 CURLOPT_WILDCARDMATCH(3)
62
64 CURLOPT_WRITEFUNCTION
65 Callback for writing data. See CURLOPT_WRITEFUNCTION(3)
66
67 CURLOPT_WRITEDATA
68 Data pointer to pass to the write callback. See CURLOPT_WRITE‐
69 DATA(3)
70
71 CURLOPT_READFUNCTION
72 Callback for reading data. See CURLOPT_READFUNCTION(3)
73
74 CURLOPT_READDATA
75 Data pointer to pass to the read callback. See CURLOPT_READ‐
76 DATA(3)
77
78 CURLOPT_IOCTLFUNCTION
79 Callback for I/O operations. See CURLOPT_IOCTLFUNCTION(3)
80
81 CURLOPT_IOCTLDATA
82 Data pointer to pass to the I/O callback. See CURLOPT_IOCTL‐
83 DATA(3)
84
85 CURLOPT_SEEKFUNCTION
86 Callback for seek operations. See CURLOPT_SEEKFUNCTION(3)
87
88 CURLOPT_SEEKDATA
89 Data pointer to pass to the seek callback. See CURLOPT_SEEK‐
90 DATA(3)
91
92 CURLOPT_SOCKOPTFUNCTION
93 Callback for sockopt operations. See CURLOPT_SOCKOPTFUNCTION(3)
94
95 CURLOPT_SOCKOPTDATA
96 Data pointer to pass to the sockopt callback. See CURLOPT_SOCK‐
97 OPTDATA(3)
98
99 CURLOPT_OPENSOCKETFUNCTION
100 Callback for socket creation. See CURLOPT_OPENSOCKETFUNCTION(3)
101
102 CURLOPT_OPENSOCKETDATA
103 Data pointer to pass to the open socket callback. See CUR‐
104 LOPT_OPENSOCKETDATA(3)
105
106 CURLOPT_CLOSESOCKETFUNCTION
107 Callback for closing socket. See CURLOPT_CLOSESOCKETFUNCTION(3)
108
109 CURLOPT_CLOSESOCKETDATA
110 Data pointer to pass to the close socket callback. See CUR‐
111 LOPT_CLOSESOCKETDATA(3)
112
113 CURLOPT_PROGRESSFUNCTION
114 OBSOLETE callback for progress meter. See CURLOPT_PROGRESSFUNC‐
115 TION(3)
116
117 CURLOPT_PROGRESSDATA
118 Data pointer to pass to the progress meter callback. See CUR‐
119 LOPT_PROGRESSDATA(3)
120
121 CURLOPT_XFERINFOFUNCTION
122 Callback for progress meter. See CURLOPT_XFERINFOFUNCTION(3)
123
124 CURLOPT_XFERINFODATA
125 Data pointer to pass to the progress meter callback. See CUR‐
126 LOPT_XFERINFODATA(3)
127
128 CURLOPT_HEADERFUNCTION
129 Callback for writing received headers. See CURLOPT_HEADERFUNC‐
130 TION(3)
131
132 CURLOPT_HEADERDATA
133 Data pointer to pass to the header callback. See CURLOPT_HEADER‐
134 DATA(3)
135
136 CURLOPT_DEBUGFUNCTION
137 Callback for debug information. See CURLOPT_DEBUGFUNCTION(3)
138
139 CURLOPT_DEBUGDATA
140 Data pointer to pass to the debug callback. See CURLOPT_DEBUG‐
141 DATA(3)
142
143 CURLOPT_SSL_CTX_FUNCTION
144 Callback for SSL context logic. See CURLOPT_SSL_CTX_FUNCTION(3)
145
146 CURLOPT_SSL_CTX_DATA
147 Data pointer to pass to the SSL context callback. See CUR‐
148 LOPT_SSL_CTX_DATA(3)
149
150 CURLOPT_CONV_TO_NETWORK_FUNCTION
151 Callback for code base conversion. See CURLOPT_CONV_TO_NET‐
152 WORK_FUNCTION(3)
153
154 CURLOPT_CONV_FROM_NETWORK_FUNCTION
155 Callback for code base conversion. See CURLOPT_CONV_FROM_NET‐
156 WORK_FUNCTION(3)
157
158 CURLOPT_CONV_FROM_UTF8_FUNCTION
159 Callback for code base conversion. See CUR‐
160 LOPT_CONV_FROM_UTF8_FUNCTION(3)
161
162 CURLOPT_INTERLEAVEFUNCTION
163 Callback for RTSP interleaved data. See CURLOPT_INTERLEAVEFUNC‐
164 TION(3)
165
166 CURLOPT_INTERLEAVEDATA
167 Data pointer to pass to the RTSP interleave callback. See CUR‐
168 LOPT_INTERLEAVEDATA(3)
169
170 CURLOPT_CHUNK_BGN_FUNCTION
171 Callback for wildcard download start of chunk. See CUR‐
172 LOPT_CHUNK_BGN_FUNCTION(3)
173
174 CURLOPT_CHUNK_END_FUNCTION
175 Callback for wildcard download end of chunk. See CUR‐
176 LOPT_CHUNK_END_FUNCTION(3)
177
178 CURLOPT_CHUNK_DATA
179 Data pointer to pass to the chunk callbacks. See CUR‐
180 LOPT_CHUNK_DATA(3)
181
182 CURLOPT_FNMATCH_FUNCTION
183 Callback for wildcard matching. See CURLOPT_FNMATCH_FUNCTION(3)
184
185 CURLOPT_FNMATCH_DATA
186 Data pointer to pass to the wildcard matching callback. See CUR‐
187 LOPT_FNMATCH_DATA(3)
188
189 CURLOPT_SUPPRESS_CONNECT_HEADERS
190 Suppress proxy CONNECT response headers from user callbacks. See
191 CURLOPT_SUPPRESS_CONNECT_HEADERS(3)
192
193 CURLOPT_RESOLVER_START_FUNCTION
194 Callback to be called before a new resolve request is started.
195 See CURLOPT_RESOLVER_START_FUNCTION(3)
196
197 CURLOPT_RESOLVER_START_DATA
198 Data pointer to pass to resolver start callback. See CURLOPT_RE‐
199 SOLVER_START_DATA(3)
200
201 CURLOPT_PREREQFUNCTION
202 Callback to be called after a connection is established but be‐
203 fore a request is made on that connection. See CURLOPT_PREREQ‐
204 FUNCTION(3)
205
206 CURLOPT_PREREQDATA
207 Data pointer to pass to the CURLOPT_PREREQFUNCTION callback. See
208 CURLOPT_PREREQDATA(3)
209
211 CURLOPT_ERRORBUFFER
212 Error message buffer. See CURLOPT_ERRORBUFFER(3)
213
214 CURLOPT_STDERR
215 stderr replacement stream. See CURLOPT_STDERR(3)
216
217 CURLOPT_FAILONERROR
218 Fail on HTTP 4xx errors. CURLOPT_FAILONERROR(3)
219
220 CURLOPT_KEEP_SENDING_ON_ERROR
221 Keep sending on HTTP >= 300 errors. CURLOPT_KEEP_SENDING_ON_ER‐
222 ROR(3)
223
225 CURLOPT_URL
226 URL to work on. See CURLOPT_URL(3)
227
228 CURLOPT_PATH_AS_IS
229 Disable squashing /../ and /./ sequences in the path. See CUR‐
230 LOPT_PATH_AS_IS(3)
231
232 CURLOPT_PROTOCOLS
233 Deprecated option Allowed protocols. See CURLOPT_PROTOCOLS(3)
234
235 CURLOPT_PROTOCOLS_STR
236 Allowed protocols. See CURLOPT_PROTOCOLS_STR(3)
237
238 CURLOPT_REDIR_PROTOCOLS
239 Deprecated option Protocols to allow redirects to. See CUR‐
240 LOPT_REDIR_PROTOCOLS(3)
241
242 CURLOPT_REDIR_PROTOCOLS_STR
243 Protocols to allow redirects to. See CURLOPT_REDIR_PROTO‐
244 COLS_STR(3)
245
246 CURLOPT_DEFAULT_PROTOCOL
247 Default protocol. See CURLOPT_DEFAULT_PROTOCOL(3)
248
249 CURLOPT_PROXY
250 Proxy to use. See CURLOPT_PROXY(3)
251
252 CURLOPT_PRE_PROXY
253 Socks proxy to use. See CURLOPT_PRE_PROXY(3)
254
255 CURLOPT_PROXYPORT
256 Proxy port to use. See CURLOPT_PROXYPORT(3)
257
258 CURLOPT_PROXYTYPE
259 Proxy type. See CURLOPT_PROXYTYPE(3)
260
261 CURLOPT_NOPROXY
262 Filter out hosts from proxy use. CURLOPT_NOPROXY(3)
263
264 CURLOPT_HTTPPROXYTUNNEL
265 Tunnel through the HTTP proxy. CURLOPT_HTTPPROXYTUNNEL(3)
266
267 CURLOPT_CONNECT_TO
268 Connect to a specific host and port. See CURLOPT_CONNECT_TO(3)
269
270 CURLOPT_SOCKS5_AUTH
271 Socks5 authentication methods. See CURLOPT_SOCKS5_AUTH(3)
272
273 CURLOPT_SOCKS5_GSSAPI_SERVICE
274 Socks5 GSSAPI service name. CURLOPT_SOCKS5_GSSAPI_SERVICE(3)
275
276 CURLOPT_SOCKS5_GSSAPI_NEC
277 Socks5 GSSAPI NEC mode. See CURLOPT_SOCKS5_GSSAPI_NEC(3)
278
279 CURLOPT_PROXY_SERVICE_NAME
280 Proxy authentication service name. CURLOPT_PROXY_SERVICE_NAME(3)
281
282 CURLOPT_HAPROXYPROTOCOL
283 Send an HAProxy PROXY protocol v1 header. See CURLOPT_HAPROX‐
284 YPROTOCOL(3)
285
286 CURLOPT_SERVICE_NAME
287 Authentication service name. CURLOPT_SERVICE_NAME(3)
288
289 CURLOPT_INTERFACE
290 Bind connection locally to this. See CURLOPT_INTERFACE(3)
291
292 CURLOPT_LOCALPORT
293 Bind connection locally to this port. See CURLOPT_LOCALPORT(3)
294
295 CURLOPT_LOCALPORTRANGE
296 Bind connection locally to port range. See CURLOPT_LOCALPOR‐
297 TRANGE(3)
298
299 CURLOPT_DNS_CACHE_TIMEOUT
300 Timeout for DNS cache. See CURLOPT_DNS_CACHE_TIMEOUT(3)
301
302 CURLOPT_DNS_USE_GLOBAL_CACHE
303 OBSOLETE Enable global DNS cache. See CUR‐
304 LOPT_DNS_USE_GLOBAL_CACHE(3)
305
306 CURLOPT_DOH_URL
307 Use this DoH server for name resolves. See CURLOPT_DOH_URL(3)
308
309 CURLOPT_BUFFERSIZE
310 Ask for alternate buffer size. See CURLOPT_BUFFERSIZE(3)
311
312 CURLOPT_PORT
313 Port number to connect to. See CURLOPT_PORT(3)
314
315 CURLOPT_TCP_FASTOPEN
316 Enable TFO, TCP Fast Open. See CURLOPT_TCP_FASTOPEN(3)
317
318 CURLOPT_TCP_NODELAY
319 Disable the Nagle algorithm. See CURLOPT_TCP_NODELAY(3)
320
321 CURLOPT_ADDRESS_SCOPE
322 IPv6 scope for local addresses. See CURLOPT_ADDRESS_SCOPE(3)
323
324 CURLOPT_TCP_KEEPALIVE
325 Enable TCP keep-alive. See CURLOPT_TCP_KEEPALIVE(3)
326
327 CURLOPT_TCP_KEEPIDLE
328 Idle time before sending keep-alive. See CURLOPT_TCP_KEEPIDLE(3)
329
330 CURLOPT_TCP_KEEPINTVL
331 Interval between keep-alive probes. See CURLOPT_TCP_KEEPINTVL(3)
332
333 CURLOPT_UNIX_SOCKET_PATH
334 Path to a Unix domain socket. See CURLOPT_UNIX_SOCKET_PATH(3)
335
336 CURLOPT_ABSTRACT_UNIX_SOCKET
337 Path to an abstract Unix domain socket. See CURLOPT_AB‐
338 STRACT_UNIX_SOCKET(3)
339
341 CURLOPT_NETRC
342 Enable .netrc parsing. See CURLOPT_NETRC(3)
343
344 CURLOPT_NETRC_FILE
345 .netrc file name. See CURLOPT_NETRC_FILE(3)
346
347 CURLOPT_USERPWD
348 User name and password. See CURLOPT_USERPWD(3)
349
350 CURLOPT_PROXYUSERPWD
351 Proxy user name and password. See CURLOPT_PROXYUSERPWD(3)
352
353 CURLOPT_USERNAME
354 User name. See CURLOPT_USERNAME(3)
355
356 CURLOPT_PASSWORD
357 Password. See CURLOPT_PASSWORD(3)
358
359 CURLOPT_LOGIN_OPTIONS
360 Login options. See CURLOPT_LOGIN_OPTIONS(3)
361
362 CURLOPT_PROXYUSERNAME
363 Proxy user name. See CURLOPT_PROXYUSERNAME(3)
364
365 CURLOPT_PROXYPASSWORD
366 Proxy password. See CURLOPT_PROXYPASSWORD(3)
367
368 CURLOPT_HTTPAUTH
369 HTTP server authentication methods. See CURLOPT_HTTPAUTH(3)
370
371 CURLOPT_TLSAUTH_USERNAME
372 TLS authentication user name. See CURLOPT_TLSAUTH_USERNAME(3)
373
374 CURLOPT_PROXY_TLSAUTH_USERNAME
375 Proxy TLS authentication user name. See CURLOPT_PROXY_TL‐
376 SAUTH_USERNAME(3)
377
378 CURLOPT_TLSAUTH_PASSWORD
379 TLS authentication password. See CURLOPT_TLSAUTH_PASSWORD(3)
380
381 CURLOPT_PROXY_TLSAUTH_PASSWORD
382 Proxy TLS authentication password. See CURLOPT_PROXY_TL‐
383 SAUTH_PASSWORD(3)
384
385 CURLOPT_TLSAUTH_TYPE
386 TLS authentication methods. See CURLOPT_TLSAUTH_TYPE(3)
387
388 CURLOPT_PROXY_TLSAUTH_TYPE
389 Proxy TLS authentication methods. See CURLOPT_PROXY_TL‐
390 SAUTH_TYPE(3)
391
392 CURLOPT_PROXYAUTH
393 HTTP proxy authentication methods. See CURLOPT_PROXYAUTH(3)
394
395 CURLOPT_SASL_AUTHZID
396 SASL authorization identity (identity to act as). See CUR‐
397 LOPT_SASL_AUTHZID(3)
398
399 CURLOPT_SASL_IR
400 Enable SASL initial response. See CURLOPT_SASL_IR(3)
401
402 CURLOPT_XOAUTH2_BEARER
403 OAuth2 bearer token. See CURLOPT_XOAUTH2_BEARER(3)
404
405 CURLOPT_DISALLOW_USERNAME_IN_URL
406 Do not allow username in URL. See CURLOPT_DISALLOW_USER‐
407 NAME_IN_URL(3)
408
410 CURLOPT_AUTOREFERER
411 Automatically set Referer: header. See CURLOPT_AUTOREFERER(3)
412
413 CURLOPT_ACCEPT_ENCODING
414 Accept-Encoding and automatic decompressing data. See CUR‐
415 LOPT_ACCEPT_ENCODING(3)
416
417 CURLOPT_TRANSFER_ENCODING
418 Request Transfer-Encoding. See CURLOPT_TRANSFER_ENCODING(3)
419
420 CURLOPT_FOLLOWLOCATION
421 Follow HTTP redirects. See CURLOPT_FOLLOWLOCATION(3)
422
423 CURLOPT_UNRESTRICTED_AUTH
424 Do not restrict authentication to original host. CURLOPT_UNRE‐
425 STRICTED_AUTH(3)
426
427 CURLOPT_MAXREDIRS
428 Maximum number of redirects to follow. See CURLOPT_MAXREDIRS(3)
429
430 CURLOPT_POSTREDIR
431 How to act on redirects after POST. See CURLOPT_POSTREDIR(3)
432
433 CURLOPT_PUT
434 Issue an HTTP PUT request. See CURLOPT_PUT(3)
435
436 CURLOPT_POST
437 Issue an HTTP POST request. See CURLOPT_POST(3)
438
439 CURLOPT_POSTFIELDS
440 Send a POST with this data. See CURLOPT_POSTFIELDS(3)
441
442 CURLOPT_POSTFIELDSIZE
443 The POST data is this big. See CURLOPT_POSTFIELDSIZE(3)
444
445 CURLOPT_POSTFIELDSIZE_LARGE
446 The POST data is this big. See CURLOPT_POSTFIELDSIZE_LARGE(3)
447
448 CURLOPT_COPYPOSTFIELDS
449 Send a POST with this data - and copy it. See CURLOPT_COPYPOST‐
450 FIELDS(3)
451
452 CURLOPT_HTTPPOST
453 Multipart formpost HTTP POST. See CURLOPT_HTTPPOST(3)
454
455 CURLOPT_REFERER
456 Referer: header. See CURLOPT_REFERER(3)
457
458 CURLOPT_USERAGENT
459 User-Agent: header. See CURLOPT_USERAGENT(3)
460
461 CURLOPT_HTTPHEADER
462 Custom HTTP headers. See CURLOPT_HTTPHEADER(3)
463
464 CURLOPT_HEADEROPT
465 Control custom headers. See CURLOPT_HEADEROPT(3)
466
467 CURLOPT_PROXYHEADER
468 Custom HTTP headers sent to proxy. See CURLOPT_PROXYHEADER(3)
469
470 CURLOPT_HTTP200ALIASES
471 Alternative versions of 200 OK. See CURLOPT_HTTP200ALIASES(3)
472
473 CURLOPT_COOKIE
474 Cookie(s) to send. See CURLOPT_COOKIE(3)
475
476 CURLOPT_COOKIEFILE
477 File to read cookies from. See CURLOPT_COOKIEFILE(3)
478
479 CURLOPT_COOKIEJAR
480 File to write cookies to. See CURLOPT_COOKIEJAR(3)
481
482 CURLOPT_COOKIESESSION
483 Start a new cookie session. See CURLOPT_COOKIESESSION(3)
484
485 CURLOPT_COOKIELIST
486 Add or control cookies. See CURLOPT_COOKIELIST(3)
487
488 CURLOPT_ALTSVC
489 Specify the Alt-Svc: cache file name. See CURLOPT_ALTSVC(3)
490
491 CURLOPT_ALTSVC_CTRL
492 Enable and configure Alt-Svc: treatment. See CUR‐
493 LOPT_ALTSVC_CTRL(3)
494
495 CURLOPT_HSTS
496 Set HSTS cache file. See CURLOPT_HSTS(3)
497
498 CURLOPT_HSTS_CTRL
499 Enable HSTS. See CURLOPT_HSTS_CTRL(3)
500
501 CURLOPT_HSTSREADFUNCTION
502 Set HSTS read callback. See CURLOPT_HSTSREADFUNCTION(3)
503
504 CURLOPT_HSTSREADDATA
505 Pass pointer to the HSTS read callback. See CURLOPT_HSTSREAD‐
506 DATA(3)
507
508 CURLOPT_HSTSWRITEFUNCTION
509 Set HSTS write callback. See CURLOPT_HSTSWRITEFUNCTION(3)
510
511 CURLOPT_HSTSWRITEDATA
512 Pass pointer to the HSTS write callback. See CURLOPT_HSTSWRITE‐
513 DATA(3)
514
515 CURLOPT_HTTPGET
516 Do an HTTP GET request. See CURLOPT_HTTPGET(3)
517
518 CURLOPT_REQUEST_TARGET
519 Set the request target. CURLOPT_REQUEST_TARGET(3)
520
521 CURLOPT_HTTP_VERSION
522 HTTP version to use. CURLOPT_HTTP_VERSION(3)
523
524 CURLOPT_HTTP09_ALLOWED
525 Allow HTTP/0.9 responses. CURLOPT_HTTP09_ALLOWED(3)
526
527 CURLOPT_IGNORE_CONTENT_LENGTH
528 Ignore Content-Length. See CURLOPT_IGNORE_CONTENT_LENGTH(3)
529
530 CURLOPT_HTTP_CONTENT_DECODING
531 Disable Content decoding. See CURLOPT_HTTP_CONTENT_DECODING(3)
532
533 CURLOPT_HTTP_TRANSFER_DECODING
534 Disable Transfer decoding. See CURLOPT_HTTP_TRANSFER_DECODING(3)
535
536 CURLOPT_EXPECT_100_TIMEOUT_MS
537 100-continue timeout. See CURLOPT_EXPECT_100_TIMEOUT_MS(3)
538
539 CURLOPT_TRAILERFUNCTION
540 Set callback for sending trailing headers. See CURLOPT_TRAILER‐
541 FUNCTION(3)
542
543 CURLOPT_TRAILERDATA
544 Custom pointer passed to the trailing headers callback. See CUR‐
545 LOPT_TRAILERDATA(3)
546
547 CURLOPT_PIPEWAIT
548 Wait on connection to pipeline on it. See CURLOPT_PIPEWAIT(3)
549
550 CURLOPT_STREAM_DEPENDS
551 This HTTP/2 stream depends on another. See CURLOPT_STREAM_DE‐
552 PENDS(3)
553
554 CURLOPT_STREAM_DEPENDS_E
555 This HTTP/2 stream depends on another exclusively. See CUR‐
556 LOPT_STREAM_DEPENDS_E(3)
557
558 CURLOPT_STREAM_WEIGHT
559 Set this HTTP/2 stream's weight. See CURLOPT_STREAM_WEIGHT(3)
560
562 CURLOPT_MAIL_FROM
563 Address of the sender. See CURLOPT_MAIL_FROM(3)
564
565 CURLOPT_MAIL_RCPT
566 Address of the recipients. See CURLOPT_MAIL_RCPT(3)
567
568 CURLOPT_MAIL_AUTH
569 Authentication address. See CURLOPT_MAIL_AUTH(3)
570
571 CURLOPT_MAIL_RCPT_ALLLOWFAILS
572 Allow RCPT TO command to fail for some recipients. See CUR‐
573 LOPT_MAIL_RCPT_ALLLOWFAILS(3)
574
576 CURLOPT_TFTP_BLKSIZE
577 TFTP block size. See CURLOPT_TFTP_BLKSIZE(3)
578
579 CURLOPT_TFTP_NO_OPTIONS
580 Do not send TFTP options requests. See CURLOPT_TFTP_NO_OP‐
581 TIONS(3)
582
584 CURLOPT_FTPPORT
585 Use active FTP. See CURLOPT_FTPPORT(3)
586
587 CURLOPT_QUOTE
588 Commands to run before transfer. See CURLOPT_QUOTE(3)
589
590 CURLOPT_POSTQUOTE
591 Commands to run after transfer. See CURLOPT_POSTQUOTE(3)
592
593 CURLOPT_PREQUOTE
594 Commands to run just before transfer. See CURLOPT_PREQUOTE(3)
595
596 CURLOPT_APPEND
597 Append to remote file. See CURLOPT_APPEND(3)
598
599 CURLOPT_FTP_USE_EPRT
600 Use EPTR. See CURLOPT_FTP_USE_EPRT(3)
601
602 CURLOPT_FTP_USE_EPSV
603 Use EPSV. See CURLOPT_FTP_USE_EPSV(3)
604
605 CURLOPT_FTP_USE_PRET
606 Use PRET. See CURLOPT_FTP_USE_PRET(3)
607
608 CURLOPT_FTP_CREATE_MISSING_DIRS
609 Create missing directories on the remote server. See CUR‐
610 LOPT_FTP_CREATE_MISSING_DIRS(3)
611
612 CURLOPT_SERVER_RESPONSE_TIMEOUT
613 Timeout for server responses. See CURLOPT_SERVER_RESPONSE_TIME‐
614 OUT(3)
615
616 CURLOPT_FTP_ALTERNATIVE_TO_USER
617 Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
618
619 CURLOPT_FTP_SKIP_PASV_IP
620 Ignore the IP address in the PASV response. See CUR‐
621 LOPT_FTP_SKIP_PASV_IP(3)
622
623 CURLOPT_FTPSSLAUTH
624 Control how to do TLS. See CURLOPT_FTPSSLAUTH(3)
625
626 CURLOPT_FTP_SSL_CCC
627 Back to non-TLS again after authentication. See CUR‐
628 LOPT_FTP_SSL_CCC(3)
629
630 CURLOPT_FTP_ACCOUNT
631 Send ACCT command. See CURLOPT_FTP_ACCOUNT(3)
632
633 CURLOPT_FTP_FILEMETHOD
634 Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3)
635
637 CURLOPT_RTSP_REQUEST
638 RTSP request. See CURLOPT_RTSP_REQUEST(3)
639
640 CURLOPT_RTSP_SESSION_ID
641 RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3)
642
643 CURLOPT_RTSP_STREAM_URI
644 RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3)
645
646 CURLOPT_RTSP_TRANSPORT
647 RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3)
648
649 CURLOPT_RTSP_CLIENT_CSEQ
650 Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3)
651
652 CURLOPT_RTSP_SERVER_CSEQ
653 CSEQ number for RTSP Server->Client request. See CUR‐
654 LOPT_RTSP_SERVER_CSEQ(3)
655
656 CURLOPT_AWS_SIGV4
657 AWS HTTP V4 Signature. See CURLOPT_AWS_SIGV4(3)
658
660 CURLOPT_TRANSFERTEXT
661 Use text transfer. See CURLOPT_TRANSFERTEXT(3)
662
663 CURLOPT_PROXY_TRANSFER_MODE
664 Add transfer mode to URL over proxy. See CURLOPT_PROXY_TRANS‐
665 FER_MODE(3)
666
667 CURLOPT_CRLF
668 Convert newlines. See CURLOPT_CRLF(3)
669
670 CURLOPT_RANGE
671 Range requests. See CURLOPT_RANGE(3)
672
673 CURLOPT_RESUME_FROM
674 Resume a transfer. See CURLOPT_RESUME_FROM(3)
675
676 CURLOPT_RESUME_FROM_LARGE
677 Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3)
678
679 CURLOPT_CURLU
680 Set URL to work on with CURLU *. See CURLOPT_CURLU(3)
681
682 CURLOPT_CUSTOMREQUEST
683 Custom request/method. See CURLOPT_CUSTOMREQUEST(3)
684
685 CURLOPT_FILETIME
686 Request file modification date and time. See CURLOPT_FILETIME(3)
687
688 CURLOPT_DIRLISTONLY
689 List only. See CURLOPT_DIRLISTONLY(3)
690
691 CURLOPT_NOBODY
692 Do not get the body contents. See CURLOPT_NOBODY(3)
693
694 CURLOPT_INFILESIZE
695 Size of file to send. CURLOPT_INFILESIZE(3)
696
697 CURLOPT_INFILESIZE_LARGE
698 Size of file to send. CURLOPT_INFILESIZE_LARGE(3)
699
700 CURLOPT_UPLOAD
701 Upload data. See CURLOPT_UPLOAD(3)
702
703 CURLOPT_UPLOAD_BUFFERSIZE
704 Set upload buffer size. See CURLOPT_UPLOAD_BUFFERSIZE(3)
705
706 CURLOPT_MIMEPOST
707 Post/send MIME data. See CURLOPT_MIMEPOST(3)
708
709 CURLOPT_MIME_OPTIONS
710 Set MIME option flags. See CURLOPT_MIME_OPTIONS(3)
711
712 CURLOPT_MAXFILESIZE
713 Maximum file size to get. See CURLOPT_MAXFILESIZE(3)
714
715 CURLOPT_MAXFILESIZE_LARGE
716 Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3)
717
718 CURLOPT_TIMECONDITION
719 Make a time conditional request. See CURLOPT_TIMECONDITION(3)
720
721 CURLOPT_TIMEVALUE
722 Time value for the time conditional request. See CUR‐
723 LOPT_TIMEVALUE(3)
724
725 CURLOPT_TIMEVALUE_LARGE
726 Time value for the time conditional request. See CUR‐
727 LOPT_TIMEVALUE_LARGE(3)
728
730 CURLOPT_TIMEOUT
731 Timeout for the entire request. See CURLOPT_TIMEOUT(3)
732
733 CURLOPT_TIMEOUT_MS
734 Millisecond timeout for the entire request. See CURLOPT_TIME‐
735 OUT_MS(3)
736
737 CURLOPT_LOW_SPEED_LIMIT
738 Low speed limit to abort transfer. See CUR‐
739 LOPT_LOW_SPEED_LIMIT(3)
740
741 CURLOPT_LOW_SPEED_TIME
742 Time to be below the speed to trigger low speed abort. See CUR‐
743 LOPT_LOW_SPEED_TIME(3)
744
745 CURLOPT_MAX_SEND_SPEED_LARGE
746 Cap the upload speed to this. See CUR‐
747 LOPT_MAX_SEND_SPEED_LARGE(3)
748
749 CURLOPT_MAX_RECV_SPEED_LARGE
750 Cap the download speed to this. See CUR‐
751 LOPT_MAX_RECV_SPEED_LARGE(3)
752
753 CURLOPT_MAXCONNECTS
754 Maximum number of connections in the connection pool. See CUR‐
755 LOPT_MAXCONNECTS(3)
756
757 CURLOPT_FRESH_CONNECT
758 Use a new connection. CURLOPT_FRESH_CONNECT(3)
759
760 CURLOPT_FORBID_REUSE
761 Prevent subsequent connections from re-using this. See CUR‐
762 LOPT_FORBID_REUSE(3)
763
764 CURLOPT_MAXAGE_CONN
765 Limit the age (idle time) of connections for reuse. See CUR‐
766 LOPT_MAXAGE_CONN(3)
767
768 CURLOPT_MAXLIFETIME_CONN
769 Limit the age (since creation) of connections for reuse. See
770 CURLOPT_MAXLIFETIME_CONN(3)
771
772 CURLOPT_CONNECTTIMEOUT
773 Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3)
774
775 CURLOPT_CONNECTTIMEOUT_MS
776 Millisecond timeout for the connection phase. See CURLOPT_CON‐
777 NECTTIMEOUT_MS(3)
778
779 CURLOPT_IPRESOLVE
780 IP version to use. See CURLOPT_IPRESOLVE(3)
781
782 CURLOPT_CONNECT_ONLY
783 Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3)
784
785 CURLOPT_USE_SSL
786 Use TLS/SSL. See CURLOPT_USE_SSL(3)
787
788 CURLOPT_RESOLVE
789 Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3)
790
791 CURLOPT_DNS_INTERFACE
792 Bind name resolves to this interface. See CURLOPT_DNS_INTER‐
793 FACE(3)
794
795 CURLOPT_DNS_LOCAL_IP4
796 Bind name resolves to this IP4 address. See CURLOPT_DNS_LO‐
797 CAL_IP4(3)
798
799 CURLOPT_DNS_LOCAL_IP6
800 Bind name resolves to this IP6 address. See CURLOPT_DNS_LO‐
801 CAL_IP6(3)
802
803 CURLOPT_DNS_SERVERS
804 Preferred DNS servers. See CURLOPT_DNS_SERVERS(3)
805
806 CURLOPT_DNS_SHUFFLE_ADDRESSES
807 Shuffle addresses before use. See CURLOPT_DNS_SHUFFLE_AD‐
808 DRESSES(3)
809
810 CURLOPT_ACCEPTTIMEOUT_MS
811 Timeout for waiting for the server's connect back to be ac‐
812 cepted. See CURLOPT_ACCEPTTIMEOUT_MS(3)
813
814 CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
815 Timeout for happy eyeballs. See CURLOPT_HAPPY_EYEBALLS_TIME‐
816 OUT_MS(3)
817
818 CURLOPT_UPKEEP_INTERVAL_MS
819 Sets the interval at which connection upkeep are performed. See
820 CURLOPT_UPKEEP_INTERVAL_MS(3)
821
823 CURLOPT_SSLCERT
824 Client cert. See CURLOPT_SSLCERT(3)
825
826 CURLOPT_SSLCERT_BLOB
827 Client cert memory buffer. See CURLOPT_SSLCERT_BLOB(3)
828
829 CURLOPT_PROXY_SSLCERT
830 Proxy client cert. See CURLOPT_PROXY_SSLCERT(3)
831
832 CURLOPT_PROXY_SSLCERT_BLOB
833 Proxy client cert memory buffer. See CUR‐
834 LOPT_PROXY_SSLCERT_BLOB(3)
835
836 CURLOPT_SSLCERTTYPE
837 Client cert type. See CURLOPT_SSLCERTTYPE(3)
838
839 CURLOPT_PROXY_SSLCERTTYPE
840 Proxy client cert type. See CURLOPT_PROXY_SSLCERTTYPE(3)
841
842 CURLOPT_SSLKEY
843 Client key. See CURLOPT_SSLKEY(3)
844
845 CURLOPT_SSLKEY_BLOB
846 Client key memory buffer. See CURLOPT_SSLKEY_BLOB(3)
847
848 CURLOPT_PROXY_SSLKEY
849 Proxy client key. See CURLOPT_PROXY_SSLKEY(3)
850
851 CURLOPT_PROXY_SSLKEY_BLOB
852 Proxy client key. See CURLOPT_PROXY_SSLKEY_BLOB(3)
853
854 CURLOPT_SSLKEYTYPE
855 Client key type. See CURLOPT_SSLKEYTYPE(3)
856
857 CURLOPT_PROXY_SSLKEYTYPE
858 Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3)
859
860 CURLOPT_KEYPASSWD
861 Client key password. See CURLOPT_KEYPASSWD(3)
862
863 CURLOPT_PROXY_KEYPASSWD
864 Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3)
865
866 CURLOPT_SSL_EC_CURVES
867 Set key exchange curves. See CURLOPT_SSL_EC_CURVES(3)
868
869 CURLOPT_SSL_ENABLE_ALPN
870 Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3)
871
872 CURLOPT_SSL_ENABLE_NPN
873 Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3)
874
875 CURLOPT_SSLENGINE
876 Use identifier with SSL engine. See CURLOPT_SSLENGINE(3)
877
878 CURLOPT_SSLENGINE_DEFAULT
879 Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3)
880
881 CURLOPT_SSL_FALSESTART
882 Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3)
883
884 CURLOPT_SSLVERSION
885 SSL version to use. See CURLOPT_SSLVERSION(3)
886
887 CURLOPT_PROXY_SSLVERSION
888 Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3)
889
890 CURLOPT_SSL_VERIFYHOST
891 Verify the host name in the SSL certificate. See CUR‐
892 LOPT_SSL_VERIFYHOST(3)
893
894 CURLOPT_DOH_SSL_VERIFYHOST
895 Verify the host name in the DoH (DNS-over-HTTPS) SSL certifi‐
896 cate. See CURLOPT_DOH_SSL_VERIFYHOST(3)
897
898 CURLOPT_PROXY_SSL_VERIFYHOST
899 Verify the host name in the proxy SSL certificate. See CUR‐
900 LOPT_PROXY_SSL_VERIFYHOST(3)
901
902 CURLOPT_SSL_VERIFYPEER
903 Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3)
904
905 CURLOPT_DOH_SSL_VERIFYPEER
906 Verify the DoH (DNS-over-HTTPS) SSL certificate. See CUR‐
907 LOPT_DOH_SSL_VERIFYPEER(3)
908
909 CURLOPT_PROXY_SSL_VERIFYPEER
910 Verify the proxy SSL certificate. See CURLOPT_PROXY_SSL_VERI‐
911 FYPEER(3)
912
913 CURLOPT_SSL_VERIFYSTATUS
914 Verify the SSL certificate's status. See CURLOPT_SSL_VERIFYSTA‐
915 TUS(3)
916
917 CURLOPT_DOH_SSL_VERIFYSTATUS
918 Verify the DoH (DNS-over-HTTPS) SSL certificate's status. See
919 CURLOPT_DOH_SSL_VERIFYSTATUS(3)
920
921 CURLOPT_CAINFO
922 CA cert bundle. See CURLOPT_CAINFO(3)
923
924 CURLOPT_CAINFO_BLOB
925 CA cert bundle memory buffer. See CURLOPT_CAINFO_BLOB(3)
926
927 CURLOPT_PROXY_CAINFO
928 Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3)
929
930 CURLOPT_PROXY_CAINFO_BLOB
931 Proxy CA cert bundle memory buffer. See CUR‐
932 LOPT_PROXY_CAINFO_BLOB(3)
933
934 CURLOPT_ISSUERCERT
935 Issuer certificate. See CURLOPT_ISSUERCERT(3)
936
937 CURLOPT_ISSUERCERT_BLOB
938 Issuer certificate memory buffer. See CURLOPT_ISSUERCERT_BLOB(3)
939
940 CURLOPT_PROXY_ISSUERCERT
941 Proxy issuer certificate. See CURLOPT_PROXY_ISSUERCERT(3)
942
943 CURLOPT_PROXY_ISSUERCERT_BLOB
944 Proxy issuer certificate memory buffer. See CURLOPT_PROXY_IS‐
945 SUERCERT_BLOB(3)
946
947 CURLOPT_CAPATH
948 Path to CA cert bundle. See CURLOPT_CAPATH(3)
949
950 CURLOPT_PROXY_CAPATH
951 Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3)
952
953 CURLOPT_CRLFILE
954 Certificate Revocation List. See CURLOPT_CRLFILE(3)
955
956 CURLOPT_PROXY_CRLFILE
957 Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3)
958
959 CURLOPT_CERTINFO
960 Extract certificate info. See CURLOPT_CERTINFO(3)
961
962 CURLOPT_PINNEDPUBLICKEY
963 Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3)
964
965 CURLOPT_PROXY_PINNEDPUBLICKEY
966 Set the proxy's pinned SSL public key. See CURLOPT_PROXY_PINNED‐
967 PUBLICKEY(3)
968
969 CURLOPT_RANDOM_FILE
970 Provide source for entropy random data. See CURLOPT_RAN‐
971 DOM_FILE(3)
972
973 CURLOPT_EGDSOCKET
974 Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3)
975
976 CURLOPT_SSL_CIPHER_LIST
977 Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3)
978
979 CURLOPT_PROXY_SSL_CIPHER_LIST
980 Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3)
981
982 CURLOPT_TLS13_CIPHERS
983 TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3)
984
985 CURLOPT_PROXY_TLS13_CIPHERS
986 Proxy TLS 1.3 cipher suites to use. See CURLOPT_PROXY_TLS13_CI‐
987 PHERS(3)
988
989 CURLOPT_SSL_SESSIONID_CACHE
990 Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3)
991
992 CURLOPT_SSL_OPTIONS
993 Control SSL behavior. See CURLOPT_SSL_OPTIONS(3)
994
995 CURLOPT_PROXY_SSL_OPTIONS
996 Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3)
997
998 CURLOPT_KRBLEVEL
999 Kerberos security level. See CURLOPT_KRBLEVEL(3)
1000
1001 CURLOPT_GSSAPI_DELEGATION
1002 Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3)
1003
1005 CURLOPT_SSH_AUTH_TYPES
1006 SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3)
1007
1008 CURLOPT_SSH_COMPRESSION
1009 Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3)
1010
1011 CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
1012 MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)
1013
1014 CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256
1015 SHA256 of host's public key. See CURLOPT_SSH_HOST_PUB‐
1016 LIC_KEY_SHA256(3)
1017
1018 CURLOPT_SSH_PUBLIC_KEYFILE
1019 File name of public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3)
1020
1021 CURLOPT_SSH_PRIVATE_KEYFILE
1022 File name of private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3)
1023
1024 CURLOPT_SSH_KNOWNHOSTS
1025 File name with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3)
1026
1027 CURLOPT_SSH_KEYFUNCTION
1028 Callback for known hosts handling. See CURLOPT_SSH_KEYFUNC‐
1029 TION(3)
1030
1031 CURLOPT_SSH_KEYDATA
1032 Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEY‐
1033 DATA(3)
1034
1035 CURLOPT_SSH_HOSTKEYFUNCTION
1036 Callback for checking host key handling. See CUR‐
1037 LOPT_SSH_HOSTKEYFUNCTION(3)
1038
1039 CURLOPT_SSH_HOSTKEYDATA
1040 Custom pointer to pass to ssh host key callback. See CUR‐
1041 LOPT_SSH_HOSTKEYDATA(3)
1042
1044 CURLOPT_PRIVATE
1045 Private pointer to store. See CURLOPT_PRIVATE(3)
1046
1047 CURLOPT_SHARE
1048 Share object to use. See CURLOPT_SHARE(3)
1049
1050 CURLOPT_NEW_FILE_PERMS
1051 Mode for creating new remote files. See CUR‐
1052 LOPT_NEW_FILE_PERMS(3)
1053
1054 CURLOPT_NEW_DIRECTORY_PERMS
1055 Mode for creating new remote directories. See CURLOPT_NEW_DIREC‐
1056 TORY_PERMS(3)
1057
1059 CURLOPT_TELNETOPTIONS
1060 TELNET options. See CURLOPT_TELNETOPTIONS(3)
1061
1063 CURL *curl = curl_easy_init();
1064 if(curl) {
1065 CURLcode res;
1066 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
1067 res = curl_easy_perform(curl);
1068 curl_easy_cleanup(curl);
1069 }
1070
1072 Always
1073
1075 CURLE_OK (zero) means that the option was set properly, non-zero means
1076 an error occurred as <curl/curl.h> defines. See the libcurl-errors(3)
1077 man page for the full list with descriptions.
1078
1079 Strings passed on to libcurl must be shorter than 8000000 bytes, other‐
1080 wise curl_easy_setopt(3) returns CURLE_BAD_FUNCTION_ARGUMENT (added in
1081 7.65.0).
1082
1083 CURLE_BAD_FUNCTION_ARGUMENT is returned when the argument to an option
1084 is invalid, like perhaps out of range.
1085
1086 If you try to set an option that libcurl does not know about, perhaps
1087 because the library is too old to support it or the option was removed
1088 in a recent version, this function will return CURLE_UNKNOWN_OPTION. If
1089 support for the option was disabled at compile-time, it will return
1090 CURLE_NOT_BUILT_IN.
1091
1093 curl_easy_init(3), curl_easy_cleanup(3), curl_easy_reset(3),
1094 curl_easy_getinfo(3), curl_multi_setopt(3), curl_easy_option_next(3),
1095 curl_easy_option_by_name(3), curl_easy_option_by_id(3),
1096
1097
1098
1099libcurl 7.85.0 July 04, 2022 curl_easy_setopt(3)