1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: curl_easy_setopt 5Section: 3 6Source: libcurl 7See-also: 8 - curl_easy_cleanup (3) 9 - curl_easy_getinfo (3) 10 - curl_easy_init (3) 11 - curl_easy_option_by_id (3) 12 - curl_easy_option_by_name (3) 13 - curl_easy_option_next (3) 14 - curl_easy_reset (3) 15 - curl_multi_setopt (3) 16Protocol: 17 - All 18--- 19 20# NAME 21 22curl_easy_setopt - set options for a curl easy handle 23 24# SYNOPSIS 25 26~~~c 27#include <curl/curl.h> 28 29CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter); 30~~~ 31 32# DESCRIPTION 33 34curl_easy_setopt(3) is used to tell libcurl how to behave. By setting the 35appropriate options, the application can change libcurl's behavior. All 36options are set with an *option* followed by a *parameter*. That parameter can 37be a **long**, a **function pointer**, an **object pointer** or a 38**curl_off_t**, depending on what the specific option expects. Read this 39manual carefully as bad input values may cause libcurl to behave badly! You 40can only set one option in each function call. A typical application uses many 41curl_easy_setopt(3) calls in the setup phase. 42 43Options set with this function call are valid for all forthcoming transfers 44performed using this *handle*. The options are not in any way reset between 45transfers, so if you want subsequent transfers with different options, you 46must change them between the transfers. You can optionally reset all options 47back to internal default with curl_easy_reset(3). 48 49Strings passed to libcurl as 'char *' arguments, are copied by the library; 50the string storage associated to the pointer argument may be discarded or 51reused after curl_easy_setopt(3) returns. The only exception to this rule is 52really CURLOPT_POSTFIELDS(3), but the alternative that copies the string 53CURLOPT_COPYPOSTFIELDS(3) has some usage characteristics you need to read up 54on. This function does not accept input strings longer than 55**CURL_MAX_INPUT_LENGTH** (8 MB). 56 57The order in which the options are set does not matter. 58 59Before version 7.17.0, strings were not copied. Instead the user was forced 60keep them available until libcurl no longer needed them. 61 62The *handle* is the return code from a curl_easy_init(3) or 63curl_easy_duphandle(3) call. 64 65# BEHAVIOR OPTIONS 66 67## CURLOPT_VERBOSE 68 69Display verbose information. See CURLOPT_VERBOSE(3) 70 71## CURLOPT_HEADER 72 73Include the header in the body output. See CURLOPT_HEADER(3) 74 75## CURLOPT_NOPROGRESS 76 77Shut off the progress meter. See CURLOPT_NOPROGRESS(3) 78 79## CURLOPT_NOSIGNAL 80 81Do not install signal handlers. See CURLOPT_NOSIGNAL(3) 82 83## CURLOPT_WILDCARDMATCH 84 85Transfer multiple files according to a filename pattern. See 86CURLOPT_WILDCARDMATCH(3) 87 88# CALLBACK OPTIONS 89 90## CURLOPT_WRITEFUNCTION 91 92Callback for writing data. See CURLOPT_WRITEFUNCTION(3) 93 94## CURLOPT_WRITEDATA 95 96Data pointer to pass to the write callback. See CURLOPT_WRITEDATA(3) 97 98## CURLOPT_READFUNCTION 99 100Callback for reading data. See CURLOPT_READFUNCTION(3) 101 102## CURLOPT_READDATA 103 104Data pointer to pass to the read callback. See CURLOPT_READDATA(3) 105 106## CURLOPT_IOCTLFUNCTION 107 108**Deprecated option** Callback for I/O operations. 109See CURLOPT_IOCTLFUNCTION(3) 110 111## CURLOPT_IOCTLDATA 112 113**Deprecated option** Data pointer to pass to the I/O callback. 114See CURLOPT_IOCTLDATA(3) 115 116## CURLOPT_SEEKFUNCTION 117 118Callback for seek operations. See CURLOPT_SEEKFUNCTION(3) 119 120## CURLOPT_SEEKDATA 121 122Data pointer to pass to the seek callback. See CURLOPT_SEEKDATA(3) 123 124## CURLOPT_SOCKOPTFUNCTION 125 126Callback for sockopt operations. See CURLOPT_SOCKOPTFUNCTION(3) 127 128## CURLOPT_SOCKOPTDATA 129 130Data pointer to pass to the sockopt callback. See CURLOPT_SOCKOPTDATA(3) 131 132## CURLOPT_OPENSOCKETFUNCTION 133 134Callback for socket creation. See CURLOPT_OPENSOCKETFUNCTION(3) 135 136## CURLOPT_OPENSOCKETDATA 137 138Data pointer to pass to the open socket callback. See CURLOPT_OPENSOCKETDATA(3) 139 140## CURLOPT_CLOSESOCKETFUNCTION 141 142Callback for closing socket. See CURLOPT_CLOSESOCKETFUNCTION(3) 143 144## CURLOPT_CLOSESOCKETDATA 145 146Data pointer to pass to the close socket callback. See CURLOPT_CLOSESOCKETDATA(3) 147 148## CURLOPT_PROGRESSFUNCTION 149 150**OBSOLETE** callback for progress meter. 151See CURLOPT_PROGRESSFUNCTION(3) 152 153## CURLOPT_PROGRESSDATA 154 155Data pointer to pass to the progress meter callback. See CURLOPT_PROGRESSDATA(3) 156 157## CURLOPT_XFERINFOFUNCTION 158 159Callback for progress meter. See CURLOPT_XFERINFOFUNCTION(3) 160 161## CURLOPT_XFERINFODATA 162 163Data pointer to pass to the progress meter callback. See CURLOPT_XFERINFODATA(3) 164 165## CURLOPT_HEADERFUNCTION 166 167Callback for writing received headers. See CURLOPT_HEADERFUNCTION(3) 168 169## CURLOPT_HEADERDATA 170 171Data pointer to pass to the header callback. See CURLOPT_HEADERDATA(3) 172 173## CURLOPT_DEBUGFUNCTION 174 175Callback for debug information. See CURLOPT_DEBUGFUNCTION(3) 176 177## CURLOPT_DEBUGDATA 178 179Data pointer to pass to the debug callback. See CURLOPT_DEBUGDATA(3) 180 181## CURLOPT_SSL_CTX_FUNCTION 182 183Callback for SSL context logic. See CURLOPT_SSL_CTX_FUNCTION(3) 184 185## CURLOPT_SSL_CTX_DATA 186 187Data pointer to pass to the SSL context callback. See CURLOPT_SSL_CTX_DATA(3) 188 189## CURLOPT_CONV_TO_NETWORK_FUNCTION 190 191**OBSOLETE** Callback for code base conversion. 192See CURLOPT_CONV_TO_NETWORK_FUNCTION(3) 193 194## CURLOPT_CONV_FROM_NETWORK_FUNCTION 195 196**OBSOLETE** Callback for code base conversion. 197See CURLOPT_CONV_FROM_NETWORK_FUNCTION(3) 198 199## CURLOPT_CONV_FROM_UTF8_FUNCTION 200 201**OBSOLETE** Callback for code base conversion. 202See CURLOPT_CONV_FROM_UTF8_FUNCTION(3) 203 204## CURLOPT_INTERLEAVEFUNCTION 205 206Callback for RTSP interleaved data. See CURLOPT_INTERLEAVEFUNCTION(3) 207 208## CURLOPT_INTERLEAVEDATA 209 210Data pointer to pass to the RTSP interleave callback. See CURLOPT_INTERLEAVEDATA(3) 211 212## CURLOPT_CHUNK_BGN_FUNCTION 213 214Callback for wildcard download start of chunk. See CURLOPT_CHUNK_BGN_FUNCTION(3) 215 216## CURLOPT_CHUNK_END_FUNCTION 217 218Callback for wildcard download end of chunk. See CURLOPT_CHUNK_END_FUNCTION(3) 219 220## CURLOPT_CHUNK_DATA 221 222Data pointer to pass to the chunk callbacks. See CURLOPT_CHUNK_DATA(3) 223 224## CURLOPT_FNMATCH_FUNCTION 225 226Callback for wildcard matching. See CURLOPT_FNMATCH_FUNCTION(3) 227 228## CURLOPT_FNMATCH_DATA 229 230Data pointer to pass to the wildcard matching callback. See CURLOPT_FNMATCH_DATA(3) 231 232## CURLOPT_SUPPRESS_CONNECT_HEADERS 233 234Suppress proxy CONNECT response headers from user callbacks. See 235CURLOPT_SUPPRESS_CONNECT_HEADERS(3) 236 237## CURLOPT_RESOLVER_START_FUNCTION 238 239Callback to be called before a new resolve request is started. See 240CURLOPT_RESOLVER_START_FUNCTION(3) 241 242## CURLOPT_RESOLVER_START_DATA 243 244Data pointer to pass to resolver start callback. See CURLOPT_RESOLVER_START_DATA(3) 245 246## CURLOPT_PREREQFUNCTION 247 248Callback to be called after a connection is established but before a request 249is made on that connection. See CURLOPT_PREREQFUNCTION(3) 250 251## CURLOPT_PREREQDATA 252 253Data pointer to pass to the CURLOPT_PREREQFUNCTION callback. See 254CURLOPT_PREREQDATA(3) 255 256# ERROR OPTIONS 257 258## CURLOPT_ERRORBUFFER 259 260Error message buffer. See CURLOPT_ERRORBUFFER(3) 261 262## CURLOPT_STDERR 263 264stderr replacement stream. See CURLOPT_STDERR(3) 265 266## CURLOPT_FAILONERROR 267 268Fail on HTTP 4xx errors. CURLOPT_FAILONERROR(3) 269 270## CURLOPT_KEEP_SENDING_ON_ERROR 271 272Keep sending on HTTP \>= 300 errors. CURLOPT_KEEP_SENDING_ON_ERROR(3) 273 274# NETWORK OPTIONS 275 276## CURLOPT_URL 277 278URL to work on. See CURLOPT_URL(3) 279 280## CURLOPT_PATH_AS_IS 281 282Disable squashing /../ and /./ sequences in the path. See CURLOPT_PATH_AS_IS(3) 283 284## CURLOPT_PROTOCOLS 285 286**Deprecated option** Allowed protocols. See CURLOPT_PROTOCOLS(3) 287 288## CURLOPT_PROTOCOLS_STR 289 290Allowed protocols. See CURLOPT_PROTOCOLS_STR(3) 291 292## CURLOPT_REDIR_PROTOCOLS 293 294**Deprecated option** Protocols to allow redirects to. See 295CURLOPT_REDIR_PROTOCOLS(3) 296 297## CURLOPT_REDIR_PROTOCOLS_STR 298 299Protocols to allow redirects to. See CURLOPT_REDIR_PROTOCOLS_STR(3) 300 301## CURLOPT_DEFAULT_PROTOCOL 302 303Default protocol. See CURLOPT_DEFAULT_PROTOCOL(3) 304 305## CURLOPT_PROXY 306 307Proxy to use. See CURLOPT_PROXY(3) 308 309## CURLOPT_PRE_PROXY 310 311Socks proxy to use. See CURLOPT_PRE_PROXY(3) 312 313## CURLOPT_PROXYPORT 314 315Proxy port to use. See CURLOPT_PROXYPORT(3) 316 317## CURLOPT_PROXYTYPE 318 319Proxy type. See CURLOPT_PROXYTYPE(3) 320 321## CURLOPT_NOPROXY 322 323Filter out hosts from proxy use. CURLOPT_NOPROXY(3) 324 325## CURLOPT_HTTPPROXYTUNNEL 326 327Tunnel through the HTTP proxy. CURLOPT_HTTPPROXYTUNNEL(3) 328 329## CURLOPT_CONNECT_TO 330 331Connect to a specific host and port. See CURLOPT_CONNECT_TO(3) 332 333## CURLOPT_SOCKS5_AUTH 334 335Socks5 authentication methods. See CURLOPT_SOCKS5_AUTH(3) 336 337## CURLOPT_SOCKS5_GSSAPI_SERVICE 338 339**Deprecated option** Socks5 GSSAPI service name. 340See CURLOPT_SOCKS5_GSSAPI_SERVICE(3) 341 342## CURLOPT_SOCKS5_GSSAPI_NEC 343 344Socks5 GSSAPI NEC mode. See CURLOPT_SOCKS5_GSSAPI_NEC(3) 345 346## CURLOPT_PROXY_SERVICE_NAME 347 348Proxy authentication service name. CURLOPT_PROXY_SERVICE_NAME(3) 349 350## CURLOPT_HAPROXYPROTOCOL 351 352Send an HAProxy PROXY protocol v1 header. See CURLOPT_HAPROXYPROTOCOL(3) 353 354## CURLOPT_HAPROXY_CLIENT_IP 355 356Spoof the client IP in an HAProxy PROXY protocol v1 header. See 357CURLOPT_HAPROXY_CLIENT_IP(3) 358 359## CURLOPT_SERVICE_NAME 360 361Authentication service name. CURLOPT_SERVICE_NAME(3) 362 363## CURLOPT_INTERFACE 364 365Bind connection locally to this. See CURLOPT_INTERFACE(3) 366 367## CURLOPT_LOCALPORT 368 369Bind connection locally to this port. See CURLOPT_LOCALPORT(3) 370 371## CURLOPT_LOCALPORTRANGE 372 373Bind connection locally to port range. See CURLOPT_LOCALPORTRANGE(3) 374 375## CURLOPT_DNS_CACHE_TIMEOUT 376 377Timeout for DNS cache. See CURLOPT_DNS_CACHE_TIMEOUT(3) 378 379## CURLOPT_DNS_USE_GLOBAL_CACHE 380 381**OBSOLETE** Enable global DNS cache. 382See CURLOPT_DNS_USE_GLOBAL_CACHE(3) 383 384## CURLOPT_DOH_URL 385 386Use this DoH server for name resolves. See CURLOPT_DOH_URL(3) 387 388## CURLOPT_BUFFERSIZE 389 390Ask for alternate buffer size. See CURLOPT_BUFFERSIZE(3) 391 392## CURLOPT_PORT 393 394Port number to connect to. See CURLOPT_PORT(3) 395 396## CURLOPT_TCP_FASTOPEN 397 398Enable TCP Fast Open. See CURLOPT_TCP_FASTOPEN(3) 399 400## CURLOPT_TCP_NODELAY 401 402Disable the Nagle algorithm. See CURLOPT_TCP_NODELAY(3) 403 404## CURLOPT_ADDRESS_SCOPE 405 406IPv6 scope for local addresses. See CURLOPT_ADDRESS_SCOPE(3) 407 408## CURLOPT_TCP_KEEPALIVE 409 410Enable TCP keep-alive. See CURLOPT_TCP_KEEPALIVE(3) 411 412## CURLOPT_TCP_KEEPIDLE 413 414Idle time before sending keep-alive. See CURLOPT_TCP_KEEPIDLE(3) 415 416## CURLOPT_TCP_KEEPINTVL 417 418Interval between keep-alive probes. See CURLOPT_TCP_KEEPINTVL(3) 419 420## CURLOPT_UNIX_SOCKET_PATH 421 422Path to a Unix domain socket. See CURLOPT_UNIX_SOCKET_PATH(3) 423 424## CURLOPT_ABSTRACT_UNIX_SOCKET 425 426Path to an abstract Unix domain socket. See CURLOPT_ABSTRACT_UNIX_SOCKET(3) 427 428# NAMES and PASSWORDS OPTIONS (Authentication) 429 430## CURLOPT_NETRC 431 432Enable .netrc parsing. See CURLOPT_NETRC(3) 433 434## CURLOPT_NETRC_FILE 435 436.netrc filename. See CURLOPT_NETRC_FILE(3) 437 438## CURLOPT_USERPWD 439 440Username and password. See CURLOPT_USERPWD(3) 441 442## CURLOPT_PROXYUSERPWD 443 444Proxy username and password. See CURLOPT_PROXYUSERPWD(3) 445 446## CURLOPT_USERNAME 447 448Username. See CURLOPT_USERNAME(3) 449 450## CURLOPT_PASSWORD 451 452Password. See CURLOPT_PASSWORD(3) 453 454## CURLOPT_LOGIN_OPTIONS 455 456Login options. See CURLOPT_LOGIN_OPTIONS(3) 457 458## CURLOPT_PROXYUSERNAME 459 460Proxy username. See CURLOPT_PROXYUSERNAME(3) 461 462## CURLOPT_PROXYPASSWORD 463 464Proxy password. See CURLOPT_PROXYPASSWORD(3) 465 466## CURLOPT_HTTPAUTH 467 468HTTP server authentication methods. See CURLOPT_HTTPAUTH(3) 469 470## CURLOPT_TLSAUTH_USERNAME 471 472TLS authentication username. See CURLOPT_TLSAUTH_USERNAME(3) 473 474## CURLOPT_PROXY_TLSAUTH_USERNAME 475 476Proxy TLS authentication username. See CURLOPT_PROXY_TLSAUTH_USERNAME(3) 477 478## CURLOPT_TLSAUTH_PASSWORD 479 480TLS authentication password. See CURLOPT_TLSAUTH_PASSWORD(3) 481 482## CURLOPT_PROXY_TLSAUTH_PASSWORD 483 484Proxy TLS authentication password. See CURLOPT_PROXY_TLSAUTH_PASSWORD(3) 485 486## CURLOPT_TLSAUTH_TYPE 487 488TLS authentication methods. See CURLOPT_TLSAUTH_TYPE(3) 489 490## CURLOPT_PROXY_TLSAUTH_TYPE 491 492Proxy TLS authentication methods. See CURLOPT_PROXY_TLSAUTH_TYPE(3) 493 494## CURLOPT_PROXYAUTH 495 496HTTP proxy authentication methods. See CURLOPT_PROXYAUTH(3) 497 498## CURLOPT_SASL_AUTHZID 499 500SASL authorization identity (identity to act as). See CURLOPT_SASL_AUTHZID(3) 501 502## CURLOPT_SASL_IR 503 504Enable SASL initial response. See CURLOPT_SASL_IR(3) 505 506## CURLOPT_XOAUTH2_BEARER 507 508OAuth2 bearer token. See CURLOPT_XOAUTH2_BEARER(3) 509 510## CURLOPT_DISALLOW_USERNAME_IN_URL 511 512Do not allow username in URL. See CURLOPT_DISALLOW_USERNAME_IN_URL(3) 513 514# HTTP OPTIONS 515 516## CURLOPT_AUTOREFERER 517 518Automatically set Referer: header. See CURLOPT_AUTOREFERER(3) 519 520## CURLOPT_ACCEPT_ENCODING 521 522Accept-Encoding and automatic decompressing data. See CURLOPT_ACCEPT_ENCODING(3) 523 524## CURLOPT_TRANSFER_ENCODING 525 526Request Transfer-Encoding. See CURLOPT_TRANSFER_ENCODING(3) 527 528## CURLOPT_FOLLOWLOCATION 529 530Follow HTTP redirects. See CURLOPT_FOLLOWLOCATION(3) 531 532## CURLOPT_UNRESTRICTED_AUTH 533 534Do not restrict authentication to original host. CURLOPT_UNRESTRICTED_AUTH(3) 535 536## CURLOPT_MAXREDIRS 537 538Maximum number of redirects to follow. See CURLOPT_MAXREDIRS(3) 539 540## CURLOPT_POSTREDIR 541 542How to act on redirects after POST. See CURLOPT_POSTREDIR(3) 543 544## CURLOPT_PUT 545 546**Deprecated option** Issue an HTTP PUT request. See CURLOPT_PUT(3) 547 548## CURLOPT_POST 549 550Issue an HTTP POST request. See CURLOPT_POST(3) 551 552## CURLOPT_POSTFIELDS 553 554Send a POST with this data. See CURLOPT_POSTFIELDS(3) 555 556## CURLOPT_POSTFIELDSIZE 557 558The POST data is this big. See CURLOPT_POSTFIELDSIZE(3) 559 560## CURLOPT_POSTFIELDSIZE_LARGE 561 562The POST data is this big. See CURLOPT_POSTFIELDSIZE_LARGE(3) 563 564## CURLOPT_COPYPOSTFIELDS 565 566Send a POST with this data - and copy it. See CURLOPT_COPYPOSTFIELDS(3) 567 568## CURLOPT_HTTPPOST 569 570**Deprecated option** Multipart formpost HTTP POST. 571See CURLOPT_HTTPPOST(3) 572 573## CURLOPT_REFERER 574 575Referer: header. See CURLOPT_REFERER(3) 576 577## CURLOPT_USERAGENT 578 579User-Agent: header. See CURLOPT_USERAGENT(3) 580 581## CURLOPT_HTTPHEADER 582 583Custom HTTP headers. See CURLOPT_HTTPHEADER(3) 584 585## CURLOPT_HEADEROPT 586 587Control custom headers. See CURLOPT_HEADEROPT(3) 588 589## CURLOPT_PROXYHEADER 590 591Custom HTTP headers sent to proxy. See CURLOPT_PROXYHEADER(3) 592 593## CURLOPT_HTTP200ALIASES 594 595Alternative versions of 200 OK. See CURLOPT_HTTP200ALIASES(3) 596 597## CURLOPT_COOKIE 598 599Cookie(s) to send. See CURLOPT_COOKIE(3) 600 601## CURLOPT_COOKIEFILE 602 603File to read cookies from. See CURLOPT_COOKIEFILE(3) 604 605## CURLOPT_COOKIEJAR 606 607File to write cookies to. See CURLOPT_COOKIEJAR(3) 608 609## CURLOPT_COOKIESESSION 610 611Start a new cookie session. See CURLOPT_COOKIESESSION(3) 612 613## CURLOPT_COOKIELIST 614 615Add or control cookies. See CURLOPT_COOKIELIST(3) 616 617## CURLOPT_ALTSVC 618 619Specify the Alt-Svc: cache filename. See CURLOPT_ALTSVC(3) 620 621## CURLOPT_ALTSVC_CTRL 622 623Enable and configure Alt-Svc: treatment. See CURLOPT_ALTSVC_CTRL(3) 624 625## CURLOPT_HSTS 626 627Set HSTS cache file. See CURLOPT_HSTS(3) 628 629## CURLOPT_HSTS_CTRL 630 631Enable HSTS. See CURLOPT_HSTS_CTRL(3) 632 633## CURLOPT_HSTSREADFUNCTION 634 635Set HSTS read callback. See CURLOPT_HSTSREADFUNCTION(3) 636 637## CURLOPT_HSTSREADDATA 638 639Pass pointer to the HSTS read callback. See CURLOPT_HSTSREADDATA(3) 640 641## CURLOPT_HSTSWRITEFUNCTION 642 643Set HSTS write callback. See CURLOPT_HSTSWRITEFUNCTION(3) 644 645## CURLOPT_HSTSWRITEDATA 646 647Pass pointer to the HSTS write callback. See CURLOPT_HSTSWRITEDATA(3) 648 649## CURLOPT_HTTPGET 650 651Do an HTTP GET request. See CURLOPT_HTTPGET(3) 652 653## CURLOPT_REQUEST_TARGET 654 655Set the request target. CURLOPT_REQUEST_TARGET(3) 656 657## CURLOPT_HTTP_VERSION 658 659HTTP version to use. CURLOPT_HTTP_VERSION(3) 660 661## CURLOPT_HTTP09_ALLOWED 662 663Allow HTTP/0.9 responses. CURLOPT_HTTP09_ALLOWED(3) 664 665## CURLOPT_IGNORE_CONTENT_LENGTH 666 667Ignore Content-Length. See CURLOPT_IGNORE_CONTENT_LENGTH(3) 668 669## CURLOPT_HTTP_CONTENT_DECODING 670 671Disable Content decoding. See CURLOPT_HTTP_CONTENT_DECODING(3) 672 673## CURLOPT_HTTP_TRANSFER_DECODING 674 675Disable Transfer decoding. See CURLOPT_HTTP_TRANSFER_DECODING(3) 676 677## CURLOPT_EXPECT_100_TIMEOUT_MS 678 679100-continue timeout. See CURLOPT_EXPECT_100_TIMEOUT_MS(3) 680 681## CURLOPT_TRAILERFUNCTION 682 683Set callback for sending trailing headers. See 684CURLOPT_TRAILERFUNCTION(3) 685 686## CURLOPT_TRAILERDATA 687 688Custom pointer passed to the trailing headers callback. See 689CURLOPT_TRAILERDATA(3) 690 691## CURLOPT_PIPEWAIT 692 693Wait on connection to pipeline on it. See CURLOPT_PIPEWAIT(3) 694 695## CURLOPT_STREAM_DEPENDS 696 697This HTTP/2 stream depends on another. See CURLOPT_STREAM_DEPENDS(3) 698 699## CURLOPT_STREAM_DEPENDS_E 700 701This HTTP/2 stream depends on another exclusively. See 702CURLOPT_STREAM_DEPENDS_E(3) 703 704## CURLOPT_STREAM_WEIGHT 705 706Set this HTTP/2 stream's weight. See CURLOPT_STREAM_WEIGHT(3) 707 708# SMTP OPTIONS 709 710## CURLOPT_MAIL_FROM 711 712Address of the sender. See CURLOPT_MAIL_FROM(3) 713 714## CURLOPT_MAIL_RCPT 715 716Address of the recipients. See CURLOPT_MAIL_RCPT(3) 717 718## CURLOPT_MAIL_AUTH 719 720Authentication address. See CURLOPT_MAIL_AUTH(3) 721 722## CURLOPT_MAIL_RCPT_ALLOWFAILS 723 724Allow RCPT TO command to fail for some recipients. See 725CURLOPT_MAIL_RCPT_ALLOWFAILS(3) 726 727# TFTP OPTIONS 728 729## CURLOPT_TFTP_BLKSIZE 730 731TFTP block size. See CURLOPT_TFTP_BLKSIZE(3) 732 733## CURLOPT_TFTP_NO_OPTIONS 734 735Do not send TFTP options requests. See CURLOPT_TFTP_NO_OPTIONS(3) 736 737# FTP OPTIONS 738 739## CURLOPT_FTPPORT 740 741Use active FTP. See CURLOPT_FTPPORT(3) 742 743## CURLOPT_QUOTE 744 745Commands to run before transfer. See CURLOPT_QUOTE(3) 746 747## CURLOPT_POSTQUOTE 748 749Commands to run after transfer. See CURLOPT_POSTQUOTE(3) 750 751## CURLOPT_PREQUOTE 752 753Commands to run just before transfer. See CURLOPT_PREQUOTE(3) 754 755## CURLOPT_APPEND 756 757Append to remote file. See CURLOPT_APPEND(3) 758 759## CURLOPT_FTP_USE_EPRT 760 761Use EPRT. See CURLOPT_FTP_USE_EPRT(3) 762 763## CURLOPT_FTP_USE_EPSV 764 765Use EPSV. See CURLOPT_FTP_USE_EPSV(3) 766 767## CURLOPT_FTP_USE_PRET 768 769Use PRET. See CURLOPT_FTP_USE_PRET(3) 770 771## CURLOPT_FTP_CREATE_MISSING_DIRS 772 773Create missing directories on the remote server. See CURLOPT_FTP_CREATE_MISSING_DIRS(3) 774 775## CURLOPT_SERVER_RESPONSE_TIMEOUT 776 777Timeout for server responses. See CURLOPT_SERVER_RESPONSE_TIMEOUT(3) 778 779## CURLOPT_SERVER_RESPONSE_TIMEOUT_MS 780 781Timeout for server responses. See CURLOPT_SERVER_RESPONSE_TIMEOUT_MS(3) 782 783## CURLOPT_FTP_ALTERNATIVE_TO_USER 784 785Alternative to USER. See CURLOPT_FTP_ALTERNATIVE_TO_USER(3) 786 787## CURLOPT_FTP_SKIP_PASV_IP 788 789Ignore the IP address in the PASV response. See CURLOPT_FTP_SKIP_PASV_IP(3) 790 791## CURLOPT_FTPSSLAUTH 792 793Control how to do TLS. See CURLOPT_FTPSSLAUTH(3) 794 795## CURLOPT_FTP_SSL_CCC 796 797Back to non-TLS again after authentication. See CURLOPT_FTP_SSL_CCC(3) 798 799## CURLOPT_FTP_ACCOUNT 800 801Send ACCT command. See CURLOPT_FTP_ACCOUNT(3) 802 803## CURLOPT_FTP_FILEMETHOD 804 805Specify how to reach files. See CURLOPT_FTP_FILEMETHOD(3) 806 807# RTSP OPTIONS 808 809## CURLOPT_RTSP_REQUEST 810 811RTSP request. See CURLOPT_RTSP_REQUEST(3) 812 813## CURLOPT_RTSP_SESSION_ID 814 815RTSP session-id. See CURLOPT_RTSP_SESSION_ID(3) 816 817## CURLOPT_RTSP_STREAM_URI 818 819RTSP stream URI. See CURLOPT_RTSP_STREAM_URI(3) 820 821## CURLOPT_RTSP_TRANSPORT 822 823RTSP Transport: header. See CURLOPT_RTSP_TRANSPORT(3) 824 825## CURLOPT_RTSP_CLIENT_CSEQ 826 827Client CSEQ number. See CURLOPT_RTSP_CLIENT_CSEQ(3) 828 829## CURLOPT_RTSP_SERVER_CSEQ 830 831CSEQ number for RTSP Server-\>Client request. See CURLOPT_RTSP_SERVER_CSEQ(3) 832 833## CURLOPT_AWS_SIGV4 834 835AWS HTTP V4 Signature. See CURLOPT_AWS_SIGV4(3) 836 837# PROTOCOL OPTIONS 838 839## CURLOPT_TRANSFERTEXT 840 841Use text transfer. See CURLOPT_TRANSFERTEXT(3) 842 843## CURLOPT_PROXY_TRANSFER_MODE 844 845Add transfer mode to URL over proxy. See CURLOPT_PROXY_TRANSFER_MODE(3) 846 847## CURLOPT_CRLF 848 849Convert newlines. See CURLOPT_CRLF(3) 850 851## CURLOPT_RANGE 852 853Range requests. See CURLOPT_RANGE(3) 854 855## CURLOPT_RESUME_FROM 856 857Resume a transfer. See CURLOPT_RESUME_FROM(3) 858 859## CURLOPT_RESUME_FROM_LARGE 860 861Resume a transfer. See CURLOPT_RESUME_FROM_LARGE(3) 862 863## CURLOPT_CURLU 864 865Set URL to work on with a URL handle. See CURLOPT_CURLU(3) 866 867## CURLOPT_CUSTOMREQUEST 868 869Custom request/method. See CURLOPT_CUSTOMREQUEST(3) 870 871## CURLOPT_FILETIME 872 873Request file modification date and time. See CURLOPT_FILETIME(3) 874 875## CURLOPT_DIRLISTONLY 876 877List only. See CURLOPT_DIRLISTONLY(3) 878 879## CURLOPT_NOBODY 880 881Do not get the body contents. See CURLOPT_NOBODY(3) 882 883## CURLOPT_INFILESIZE 884 885Size of file to send. CURLOPT_INFILESIZE(3) 886 887## CURLOPT_INFILESIZE_LARGE 888 889Size of file to send. CURLOPT_INFILESIZE_LARGE(3) 890 891## CURLOPT_UPLOAD 892 893Upload data. See CURLOPT_UPLOAD(3) 894 895## CURLOPT_UPLOAD_BUFFERSIZE 896 897Set upload buffer size. See CURLOPT_UPLOAD_BUFFERSIZE(3) 898 899## CURLOPT_MIMEPOST 900 901Post/send MIME data. See CURLOPT_MIMEPOST(3) 902 903## CURLOPT_MIME_OPTIONS 904 905Set MIME option flags. See CURLOPT_MIME_OPTIONS(3) 906 907## CURLOPT_MAXFILESIZE 908 909Maximum file size to get. See CURLOPT_MAXFILESIZE(3) 910 911## CURLOPT_MAXFILESIZE_LARGE 912 913Maximum file size to get. See CURLOPT_MAXFILESIZE_LARGE(3) 914 915## CURLOPT_TIMECONDITION 916 917Make a time conditional request. See CURLOPT_TIMECONDITION(3) 918 919## CURLOPT_TIMEVALUE 920 921Time value for the time conditional request. See CURLOPT_TIMEVALUE(3) 922 923## CURLOPT_TIMEVALUE_LARGE 924 925Time value for the time conditional request. See CURLOPT_TIMEVALUE_LARGE(3) 926 927# CONNECTION OPTIONS 928 929## CURLOPT_TIMEOUT 930 931Timeout for the entire request. See CURLOPT_TIMEOUT(3) 932 933## CURLOPT_TIMEOUT_MS 934 935Millisecond timeout for the entire request. See CURLOPT_TIMEOUT_MS(3) 936 937## CURLOPT_LOW_SPEED_LIMIT 938 939Low speed limit to abort transfer. See CURLOPT_LOW_SPEED_LIMIT(3) 940 941## CURLOPT_LOW_SPEED_TIME 942 943Time to be below the speed to trigger low speed abort. See CURLOPT_LOW_SPEED_TIME(3) 944 945## CURLOPT_MAX_SEND_SPEED_LARGE 946 947Cap the upload speed to this. See CURLOPT_MAX_SEND_SPEED_LARGE(3) 948 949## CURLOPT_MAX_RECV_SPEED_LARGE 950 951Cap the download speed to this. See CURLOPT_MAX_RECV_SPEED_LARGE(3) 952 953## CURLOPT_MAXCONNECTS 954 955Maximum number of connections in the connection pool. See CURLOPT_MAXCONNECTS(3) 956 957## CURLOPT_FRESH_CONNECT 958 959Use a new connection. CURLOPT_FRESH_CONNECT(3) 960 961## CURLOPT_FORBID_REUSE 962 963Prevent subsequent connections from reusing this. See CURLOPT_FORBID_REUSE(3) 964 965## CURLOPT_MAXAGE_CONN 966 967Limit the age (idle time) of connections for reuse. See CURLOPT_MAXAGE_CONN(3) 968 969## CURLOPT_MAXLIFETIME_CONN 970 971Limit the age (since creation) of connections for reuse. See 972CURLOPT_MAXLIFETIME_CONN(3) 973 974## CURLOPT_CONNECTTIMEOUT 975 976Timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT(3) 977 978## CURLOPT_CONNECTTIMEOUT_MS 979 980Millisecond timeout for the connection phase. See CURLOPT_CONNECTTIMEOUT_MS(3) 981 982## CURLOPT_IPRESOLVE 983 984IP version to use. See CURLOPT_IPRESOLVE(3) 985 986## CURLOPT_CONNECT_ONLY 987 988Only connect, nothing else. See CURLOPT_CONNECT_ONLY(3) 989 990## CURLOPT_USE_SSL 991 992Use TLS/SSL. See CURLOPT_USE_SSL(3) 993 994## CURLOPT_RESOLVE 995 996Provide fixed/fake name resolves. See CURLOPT_RESOLVE(3) 997 998## CURLOPT_DNS_INTERFACE 999 1000Bind name resolves to this interface. See CURLOPT_DNS_INTERFACE(3) 1001 1002## CURLOPT_DNS_LOCAL_IP4 1003 1004Bind name resolves to this IP4 address. See CURLOPT_DNS_LOCAL_IP4(3) 1005 1006## CURLOPT_DNS_LOCAL_IP6 1007 1008Bind name resolves to this IP6 address. See CURLOPT_DNS_LOCAL_IP6(3) 1009 1010## CURLOPT_DNS_SERVERS 1011 1012Preferred DNS servers. See CURLOPT_DNS_SERVERS(3) 1013 1014## CURLOPT_DNS_SHUFFLE_ADDRESSES 1015 1016Shuffle addresses before use. See CURLOPT_DNS_SHUFFLE_ADDRESSES(3) 1017 1018## CURLOPT_ACCEPTTIMEOUT_MS 1019 1020Timeout for waiting for the server's connect back to be accepted. See 1021CURLOPT_ACCEPTTIMEOUT_MS(3) 1022 1023## CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 1024 1025Timeout for happy eyeballs. See CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS(3) 1026 1027## CURLOPT_UPKEEP_INTERVAL_MS 1028 1029Sets the interval at which connection upkeep are performed. See 1030CURLOPT_UPKEEP_INTERVAL_MS(3) 1031 1032# SSL and SECURITY OPTIONS 1033 1034## CURLOPT_SSLCERT 1035 1036Client cert. See CURLOPT_SSLCERT(3) 1037 1038## CURLOPT_SSLCERT_BLOB 1039 1040Client cert memory buffer. See CURLOPT_SSLCERT_BLOB(3) 1041 1042## CURLOPT_PROXY_SSLCERT 1043 1044Proxy client cert. See CURLOPT_PROXY_SSLCERT(3) 1045 1046## CURLOPT_PROXY_SSLCERT_BLOB 1047 1048Proxy client cert memory buffer. See CURLOPT_PROXY_SSLCERT_BLOB(3) 1049 1050## CURLOPT_SSLCERTTYPE 1051 1052Client cert type. See CURLOPT_SSLCERTTYPE(3) 1053 1054## CURLOPT_PROXY_SSLCERTTYPE 1055 1056Proxy client cert type. See CURLOPT_PROXY_SSLCERTTYPE(3) 1057 1058## CURLOPT_SSLKEY 1059 1060Client key. See CURLOPT_SSLKEY(3) 1061 1062## CURLOPT_SSLKEY_BLOB 1063 1064Client key memory buffer. See CURLOPT_SSLKEY_BLOB(3) 1065 1066## CURLOPT_PROXY_SSLKEY 1067 1068Proxy client key. See CURLOPT_PROXY_SSLKEY(3) 1069 1070## CURLOPT_PROXY_SSLKEY_BLOB 1071 1072Proxy client key. See CURLOPT_PROXY_SSLKEY_BLOB(3) 1073 1074## CURLOPT_SSLKEYTYPE 1075 1076Client key type. See CURLOPT_SSLKEYTYPE(3) 1077 1078## CURLOPT_PROXY_SSLKEYTYPE 1079 1080Proxy client key type. See CURLOPT_PROXY_SSLKEYTYPE(3) 1081 1082## CURLOPT_KEYPASSWD 1083 1084Client key password. See CURLOPT_KEYPASSWD(3) 1085 1086## CURLOPT_PROXY_KEYPASSWD 1087 1088Proxy client key password. See CURLOPT_PROXY_KEYPASSWD(3) 1089 1090## CURLOPT_SSL_EC_CURVES 1091 1092Set key exchange curves. See CURLOPT_SSL_EC_CURVES(3) 1093 1094## CURLOPT_SSL_ENABLE_ALPN 1095 1096Enable use of ALPN. See CURLOPT_SSL_ENABLE_ALPN(3) 1097 1098## CURLOPT_SSL_ENABLE_NPN 1099 1100**OBSOLETE** Enable use of NPN. See CURLOPT_SSL_ENABLE_NPN(3) 1101 1102## CURLOPT_SSLENGINE 1103 1104Use identifier with SSL engine. See CURLOPT_SSLENGINE(3) 1105 1106## CURLOPT_SSLENGINE_DEFAULT 1107 1108Default SSL engine. See CURLOPT_SSLENGINE_DEFAULT(3) 1109 1110## CURLOPT_SSL_FALSESTART 1111 1112Enable TLS False Start. See CURLOPT_SSL_FALSESTART(3) 1113 1114## CURLOPT_SSLVERSION 1115 1116SSL version to use. See CURLOPT_SSLVERSION(3) 1117 1118## CURLOPT_PROXY_SSLVERSION 1119 1120Proxy SSL version to use. See CURLOPT_PROXY_SSLVERSION(3) 1121 1122## CURLOPT_SSL_VERIFYHOST 1123 1124Verify the hostname in the SSL certificate. See CURLOPT_SSL_VERIFYHOST(3) 1125 1126## CURLOPT_DOH_SSL_VERIFYHOST 1127 1128Verify the hostname in the DoH (DNS-over-HTTPS) SSL certificate. See 1129CURLOPT_DOH_SSL_VERIFYHOST(3) 1130 1131## CURLOPT_PROXY_SSL_VERIFYHOST 1132 1133Verify the hostname in the proxy SSL certificate. See 1134CURLOPT_PROXY_SSL_VERIFYHOST(3) 1135 1136## CURLOPT_SSL_VERIFYPEER 1137 1138Verify the SSL certificate. See CURLOPT_SSL_VERIFYPEER(3) 1139 1140## CURLOPT_DOH_SSL_VERIFYPEER 1141 1142Verify the DoH (DNS-over-HTTPS) SSL certificate. See 1143CURLOPT_DOH_SSL_VERIFYPEER(3) 1144 1145## CURLOPT_PROXY_SSL_VERIFYPEER 1146 1147Verify the proxy SSL certificate. See CURLOPT_PROXY_SSL_VERIFYPEER(3) 1148 1149## CURLOPT_SSL_VERIFYSTATUS 1150 1151Verify the SSL certificate's status. See CURLOPT_SSL_VERIFYSTATUS(3) 1152 1153## CURLOPT_DOH_SSL_VERIFYSTATUS 1154 1155Verify the DoH (DNS-over-HTTPS) SSL certificate's status. See 1156CURLOPT_DOH_SSL_VERIFYSTATUS(3) 1157 1158## CURLOPT_CAINFO 1159 1160CA cert bundle. See CURLOPT_CAINFO(3) 1161 1162## CURLOPT_CAINFO_BLOB 1163 1164CA cert bundle memory buffer. See CURLOPT_CAINFO_BLOB(3) 1165 1166## CURLOPT_PROXY_CAINFO 1167 1168Proxy CA cert bundle. See CURLOPT_PROXY_CAINFO(3) 1169 1170## CURLOPT_PROXY_CAINFO_BLOB 1171 1172Proxy CA cert bundle memory buffer. See CURLOPT_PROXY_CAINFO_BLOB(3) 1173 1174## CURLOPT_ISSUERCERT 1175 1176Issuer certificate. See CURLOPT_ISSUERCERT(3) 1177 1178## CURLOPT_ISSUERCERT_BLOB 1179 1180Issuer certificate memory buffer. See CURLOPT_ISSUERCERT_BLOB(3) 1181 1182## CURLOPT_PROXY_ISSUERCERT 1183 1184Proxy issuer certificate. See CURLOPT_PROXY_ISSUERCERT(3) 1185 1186## CURLOPT_PROXY_ISSUERCERT_BLOB 1187 1188Proxy issuer certificate memory buffer. See CURLOPT_PROXY_ISSUERCERT_BLOB(3) 1189 1190## CURLOPT_CAPATH 1191 1192Path to CA cert bundle. See CURLOPT_CAPATH(3) 1193 1194## CURLOPT_PROXY_CAPATH 1195 1196Path to proxy CA cert bundle. See CURLOPT_PROXY_CAPATH(3) 1197 1198## CURLOPT_CRLFILE 1199 1200Certificate Revocation List. See CURLOPT_CRLFILE(3) 1201 1202## CURLOPT_PROXY_CRLFILE 1203 1204Proxy Certificate Revocation List. See CURLOPT_PROXY_CRLFILE(3) 1205 1206## CURLOPT_CA_CACHE_TIMEOUT 1207 1208Timeout for CA cache. See CURLOPT_CA_CACHE_TIMEOUT(3) 1209 1210## CURLOPT_CERTINFO 1211 1212Extract certificate info. See CURLOPT_CERTINFO(3) 1213 1214## CURLOPT_PINNEDPUBLICKEY 1215 1216Set pinned SSL public key . See CURLOPT_PINNEDPUBLICKEY(3) 1217 1218## CURLOPT_PROXY_PINNEDPUBLICKEY 1219 1220Set the proxy's pinned SSL public key. See 1221CURLOPT_PROXY_PINNEDPUBLICKEY(3) 1222 1223## CURLOPT_RANDOM_FILE 1224 1225**OBSOLETE** Provide source for entropy random data. 1226See CURLOPT_RANDOM_FILE(3) 1227 1228## CURLOPT_EGDSOCKET 1229 1230**OBSOLETE** Identify EGD socket for entropy. See CURLOPT_EGDSOCKET(3) 1231 1232## CURLOPT_SSL_CIPHER_LIST 1233 1234Ciphers to use. See CURLOPT_SSL_CIPHER_LIST(3) 1235 1236## CURLOPT_PROXY_SSL_CIPHER_LIST 1237 1238Proxy ciphers to use. See CURLOPT_PROXY_SSL_CIPHER_LIST(3) 1239 1240## CURLOPT_TLS13_CIPHERS 1241 1242TLS 1.3 cipher suites to use. See CURLOPT_TLS13_CIPHERS(3) 1243 1244## CURLOPT_PROXY_TLS13_CIPHERS 1245 1246Proxy TLS 1.3 cipher suites to use. See CURLOPT_PROXY_TLS13_CIPHERS(3) 1247 1248## CURLOPT_SSL_SESSIONID_CACHE 1249 1250Disable SSL session-id cache. See CURLOPT_SSL_SESSIONID_CACHE(3) 1251 1252## CURLOPT_SSL_OPTIONS 1253 1254Control SSL behavior. See CURLOPT_SSL_OPTIONS(3) 1255 1256## CURLOPT_PROXY_SSL_OPTIONS 1257 1258Control proxy SSL behavior. See CURLOPT_PROXY_SSL_OPTIONS(3) 1259 1260## CURLOPT_KRBLEVEL 1261 1262Kerberos security level. See CURLOPT_KRBLEVEL(3) 1263 1264## CURLOPT_GSSAPI_DELEGATION 1265 1266Disable GSS-API delegation. See CURLOPT_GSSAPI_DELEGATION(3) 1267 1268# SSH OPTIONS 1269 1270## CURLOPT_SSH_AUTH_TYPES 1271 1272SSH authentication types. See CURLOPT_SSH_AUTH_TYPES(3) 1273 1274## CURLOPT_SSH_COMPRESSION 1275 1276Enable SSH compression. See CURLOPT_SSH_COMPRESSION(3) 1277 1278## CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 1279 1280MD5 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3) 1281 1282## CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 1283 1284SHA256 of host's public key. See CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256(3) 1285 1286## CURLOPT_SSH_PUBLIC_KEYFILE 1287 1288Filename of the public key. See CURLOPT_SSH_PUBLIC_KEYFILE(3) 1289 1290## CURLOPT_SSH_PRIVATE_KEYFILE 1291 1292Filename of the private key. See CURLOPT_SSH_PRIVATE_KEYFILE(3) 1293 1294## CURLOPT_SSH_KNOWNHOSTS 1295 1296Filename with known hosts. See CURLOPT_SSH_KNOWNHOSTS(3) 1297 1298## CURLOPT_SSH_KEYFUNCTION 1299 1300Callback for known hosts handling. See CURLOPT_SSH_KEYFUNCTION(3) 1301 1302## CURLOPT_SSH_KEYDATA 1303 1304Custom pointer to pass to ssh key callback. See CURLOPT_SSH_KEYDATA(3) 1305 1306## CURLOPT_SSH_HOSTKEYFUNCTION 1307 1308Callback for checking host key handling. See CURLOPT_SSH_HOSTKEYFUNCTION(3) 1309 1310## CURLOPT_SSH_HOSTKEYDATA 1311 1312Custom pointer to pass to ssh host key callback. See CURLOPT_SSH_HOSTKEYDATA(3) 1313 1314# WEBSOCKET 1315 1316## CURLOPT_WS_OPTIONS 1317 1318Set WebSocket options. See CURLOPT_WS_OPTIONS(3) 1319 1320# OTHER OPTIONS 1321 1322## CURLOPT_PRIVATE 1323 1324Private pointer to store. See CURLOPT_PRIVATE(3) 1325 1326## CURLOPT_SHARE 1327 1328Share object to use. See CURLOPT_SHARE(3) 1329 1330## CURLOPT_NEW_FILE_PERMS 1331 1332Mode for creating new remote files. See CURLOPT_NEW_FILE_PERMS(3) 1333 1334## CURLOPT_NEW_DIRECTORY_PERMS 1335 1336Mode for creating new remote directories. See CURLOPT_NEW_DIRECTORY_PERMS(3) 1337 1338## CURLOPT_QUICK_EXIT 1339 1340To be set by toplevel tools like "curl" to skip lengthy cleanups when they are 1341about to call exit() anyway. See CURLOPT_QUICK_EXIT(3) 1342 1343# TELNET OPTIONS 1344 1345## CURLOPT_TELNETOPTIONS 1346 1347TELNET options. See CURLOPT_TELNETOPTIONS(3) 1348 1349# EXAMPLE 1350 1351~~~c 1352int main(void) 1353{ 1354 CURL *curl = curl_easy_init(); 1355 if(curl) { 1356 CURLcode res; 1357 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 1358 res = curl_easy_perform(curl); 1359 curl_easy_cleanup(curl); 1360 } 1361} 1362~~~ 1363 1364# ENCRYPTED CLIENT HELLO OPTIONS 1365 1366## CURLOPT_ECH 1367 1368Set the configuration for ECH. See CURLOPT_ECH(3) 1369 1370# AVAILABILITY 1371 1372Always 1373 1374# RETURN VALUE 1375 1376*CURLE_OK* (zero) means that the option was set properly, non-zero means an 1377error occurred as *\<curl/curl.h\>* defines. See the libcurl-errors(3) man 1378page for the full list with descriptions. 1379 1380Strings passed on to libcurl must be shorter than 8000000 bytes, otherwise 1381curl_easy_setopt(3) returns **CURLE_BAD_FUNCTION_ARGUMENT** (added in 7.65.0). 1382 1383**CURLE_BAD_FUNCTION_ARGUMENT** is returned when the argument to an option is 1384invalid, like perhaps out of range. 1385 1386If you try to set an option that libcurl does not know about, perhaps because 1387the library is too old to support it or the option was removed in a recent 1388version, this function returns *CURLE_UNKNOWN_OPTION*. If support for the 1389option was disabled at compile-time, it returns *CURLE_NOT_BUILT_IN*. 1390