All options

This is a table of available options for curl_easy_setopt().

OptionPurpose
CURLOPT_ABSTRACT_UNIX_SOCKETabstract Unix domain socket
CURLOPT_ACCEPT_ENCODINGautomatic decompression of HTTP downloads
CURLOPT_ACCEPTTIMEOUT_MStimeout waiting for FTP server to connect back
CURLOPT_ADDRESS_SCOPEscope id for IPv6 addresses
CURLOPT_ALTSVC_CTRLcontrol alt-svc behavior
CURLOPT_ALTSVCalt-svc cache filename
CURLOPT_APPENDappend to the remote file
CURLOPT_AUTOREFERERautomatically update the referer header
CURLOPT_AWS_SIGV4V4 signature
CURLOPT_BUFFERSIZEreceive buffer size
CURLOPT_CA_CACHE_TIMEOUTlife-time for cached certificate stores
CURLOPT_CAINFO_BLOBCertificate Authority (CA) bundle in PEM format
CURLOPT_CAINFOpath to Certificate Authority (CA) bundle
CURLOPT_CAPATHdirectory holding CA certificates
CURLOPT_CERTINFOrequest SSL certificate information
CURLOPT_CHUNK_BGN_FUNCTIONcallback before a transfer with FTP wildcardmatch
CURLOPT_CHUNK_DATApointer passed to the FTP chunk callbacks
CURLOPT_CHUNK_END_FUNCTIONcallback after a transfer with FTP wildcardmatch
CURLOPT_CLOSESOCKETDATApointer passed to the socket close callback
CURLOPT_CLOSESOCKETFUNCTIONcallback to socket close replacement
CURLOPT_CONNECT_ONLYstop when connected to target server
CURLOPT_CONNECT_TOconnect to a specific host and port instead of the URL's host and port
CURLOPT_CONNECTTIMEOUT_MStimeout for the connect phase
CURLOPT_CONNECTTIMEOUTtimeout for the connect phase
CURLOPT_CONV_FROM_NETWORK_FUNCTIONconvert data from network to host encoding
CURLOPT_CONV_FROM_UTF8_FUNCTIONconvert data from UTF8 to host encoding
CURLOPT_CONV_TO_NETWORK_FUNCTIONconvert data to network from host encoding
CURLOPT_COOKIEHTTP Cookie header
CURLOPT_COOKIEFILEfilename to read cookies from
CURLOPT_COOKIEJARfilename to store cookies to
CURLOPT_COOKIELISTadd to or manipulate cookies held in memory
CURLOPT_COOKIESESSIONstart a new cookie session
CURLOPT_COPYPOSTFIELDShave libcurl copy data to POST
CURLOPT_CRLFCRLF conversion
CURLOPT_CRLFILECertificate Revocation List file
CURLOPT_CURLUURL in CURLU * format
CURLOPT_CUSTOMREQUESTcustom request method
CURLOPT_DEBUGDATApointer passed to the debug callback
CURLOPT_DEBUGFUNCTIONdebug callback
CURLOPT_DEFAULT_PROTOCOLdefault protocol to use if the URL is missing a
CURLOPT_DIRLISTONLYask for names only in a directory listing
CURLOPT_DISALLOW_USERNAME_IN_URLdisallow specifying username in the URL
CURLOPT_DNS_CACHE_TIMEOUTlife-time for DNS cache entries
CURLOPT_DNS_INTERFACEinterface to speak DNS over
CURLOPT_DNS_LOCAL_IP4IPv4 address to bind DNS resolves to
CURLOPT_DNS_LOCAL_IP6IPv6 address to bind DNS resolves to
CURLOPT_DNS_SERVERSDNS servers to use
CURLOPT_DNS_SHUFFLE_ADDRESSESshuffle IP addresses for hostname
CURLOPT_DNS_USE_GLOBAL_CACHEglobal DNS cache
CURLOPT_DOH_SSL_VERIFYHOSTverify the hostname in the DoH SSL certificate
CURLOPT_DOH_SSL_VERIFYPEERverify the DoH SSL certificate
CURLOPT_DOH_SSL_VERIFYSTATUSverify the DoH SSL certificate's status
CURLOPT_DOH_URLprovide the DNS-over-HTTPS URL
CURLOPT_EGDSOCKETEGD socket path
CURLOPT_ERRORBUFFERerror buffer for error messages
CURLOPT_EXPECT_100_TIMEOUT_MStimeout for Expect: 100-continue response
CURLOPT_FAILONERRORrequest failure on HTTP response >= 400
CURLOPT_FILETIMEget the modification time of the remote resource
CURLOPT_FNMATCH_DATApointer passed to the fnmatch callback
CURLOPT_FNMATCH_FUNCTIONwildcard match callback
CURLOPT_FOLLOWLOCATIONfollow HTTP 3xx redirects
CURLOPT_FORBID_REUSEmake connection get closed at once after use
CURLOPT_FRESH_CONNECTforce a new connection to be used
CURLOPT_FTP_ACCOUNTaccount info for FTP
CURLOPT_FTP_ALTERNATIVE_TO_USERcommand to use instead of USER with FTP
CURLOPT_FTP_CREATE_MISSING_DIRScreate missing dirs for FTP and SFTP
CURLOPT_FTP_FILEMETHODselect directory traversing method for FTP
CURLOPT_FTP_RESPONSE_TIMEOUTtime allowed to wait for FTP response
CURLOPT_FTP_SKIP_PASV_IPignore the IP address in the PASV response
CURLOPT_FTP_SSL_CCCswitch off SSL again with FTP after auth
CURLOPT_FTP_USE_EPRTuse EPRT for FTP
CURLOPT_FTP_USE_EPSVuse EPSV for FTP
CURLOPT_FTP_USE_PRETuse PRET for FTP
CURLOPT_FTPPORTmake FTP transfer active
CURLOPT_FTPSSLAUTHorder in which to attempt TLS vs SSL
CURLOPT_GSSAPI_DELEGATIONallowed GSS-API delegation
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MShead start for ipv6 for happy eyeballs
CURLOPT_HAPROXY_CLIENT_IPset HAProxy PROXY protocol client IP
CURLOPT_HAPROXYPROTOCOLsend HAProxy PROXY protocol v1 header
CURLOPT_HEADERpass headers to the data stream
CURLOPT_HEADERDATApointer to pass to header callback
CURLOPT_HEADERFUNCTIONcallback that receives header data
CURLOPT_HEADEROPTsend HTTP headers to both proxy and host or separately
CURLOPT_HSTS_CTRLcontrol HSTS behavior
CURLOPT_HSTSHSTS cache filename
CURLOPT_HSTSREADDATApointer passed to the HSTS read callback
CURLOPT_HSTSREADFUNCTIONread callback for HSTS hosts
CURLOPT_HSTSWRITEDATApointer passed to the HSTS write callback
CURLOPT_HSTSWRITEFUNCTIONwrite callback for HSTS hosts
CURLOPT_HTTP09_ALLOWEDallow HTTP/0.9 response
CURLOPT_HTTP200ALIASESalternative matches for HTTP 200 OK
CURLOPT_HTTP_CONTENT_DECODINGHTTP content decoding control
CURLOPT_HTTP_TRANSFER_DECODINGHTTP transfer decoding control
CURLOPT_HTTP_VERSIONHTTP protocol version to use
CURLOPT_HTTPAUTHHTTP server authentication methods to try
CURLOPT_HTTPGETask for an HTTP GET request
CURLOPT_HTTPHEADERset of HTTP headers
CURLOPT_HTTPPOSTmultipart formpost content
CURLOPT_HTTPPROXYTUNNELtunnel through HTTP proxy
CURLOPT_IGNORE_CONTENT_LENGTHignore content length
CURLOPT_INFILESIZE_LARGEsize of the input file to send off
CURLOPT_INFILESIZEsize of the input file to send off
CURLOPT_INTERFACEsource interface for outgoing traffic
CURLOPT_INTERLEAVEDATApointer passed to RTSP interleave callback
CURLOPT_INTERLEAVEFUNCTIONcallback for RTSP interleaved data
CURLOPT_IOCTLDATApointer passed to I/O callback
CURLOPT_IOCTLFUNCTIONcallback for I/O operations
CURLOPT_IPRESOLVEIP protocol version to use
CURLOPT_ISSUERCERT_BLOBissuer SSL certificate from memory blob
CURLOPT_ISSUERCERTissuer SSL certificate filename
CURLOPT_KEEP_SENDING_ON_ERRORkeep sending on early HTTP response >= 300
CURLOPT_KEYPASSWDpassphrase to private key
CURLOPT_KRBLEVELFTP kerberos security level
CURLOPT_LOCALPORTlocal port number to use for socket
CURLOPT_LOCALPORTRANGEnumber of additional local ports to try
CURLOPT_LOGIN_OPTIONSlogin options
CURLOPT_LOW_SPEED_LIMITlow speed limit in bytes per second
CURLOPT_LOW_SPEED_TIMElow speed limit time period
CURLOPT_MAIL_AUTHSMTP authentication address
CURLOPT_MAIL_FROMSMTP sender address
CURLOPT_MAIL_RCPT_ALLOWFAILSallow RCPT TO command to fail for some recipients
CURLOPT_MAIL_RCPTlist of SMTP mail recipients
CURLOPT_MAX_RECV_SPEED_LARGErate limit data download speed
CURLOPT_MAX_SEND_SPEED_LARGErate limit data upload speed
CURLOPT_MAXAGE_CONNmax idle time allowed for reusing a connection
CURLOPT_MAXCONNECTSmaximum connection cache size
CURLOPT_MAXFILESIZE_LARGEmaximum file size allowed to download
CURLOPT_MAXFILESIZEmaximum file size allowed to download
CURLOPT_MAXLIFETIME_CONNmax lifetime (since creation) allowed for reusing a connection
CURLOPT_MAXREDIRSmaximum number of redirects allowed
CURLOPT_MIME_OPTIONSset MIME option flags
CURLOPT_MIMEPOSTsend data from mime structure
CURLOPT_NETRC_FILEfilename to read .netrc info from
CURLOPT_NETRCenable use of .netrc
CURLOPT_NEW_DIRECTORY_PERMSpermissions for remotely created directories
CURLOPT_NEW_FILE_PERMSpermissions for remotely created files
CURLOPT_NOBODYdo the download request without getting the body
CURLOPT_NOPROGRESSswitch off the progress meter
CURLOPT_NOPROXYdisable proxy use for specific hosts
CURLOPT_NOSIGNALskip all signal handling
CURLOPT_OPENSOCKETDATApointer passed to open socket callback
CURLOPT_OPENSOCKETFUNCTIONcallback for opening socket
CURLOPT_PASSWORDpassword to use in authentication
CURLOPT_PATH_AS_ISdo not handle dot dot sequences
CURLOPT_PINNEDPUBLICKEYpinned public key
CURLOPT_PIPEWAITwait for pipelining/multiplexing
CURLOPT_PORTremote port number to connect to
CURLOPT_POSTmake an HTTP POST
CURLOPT_POSTFIELDSdata to POST to server
CURLOPT_POSTFIELDSIZE_LARGEsize of POST data pointed to
CURLOPT_POSTFIELDSIZEsize of POST data pointed to
CURLOPT_POSTQUOTE(S)FTP commands to run after the transfer
CURLOPT_POSTREDIRhow to act on an HTTP POST redirect
CURLOPT_PRE_PROXYpre-proxy host to use
CURLOPT_PREQUOTEcommands to run before an FTP transfer
CURLOPT_PREREQDATApointer passed to the pre-request callback
CURLOPT_PREREQFUNCTIONuser callback called when a connection has been
CURLOPT_PRIVATEstore a private pointer
CURLOPT_PROGRESSDATApointer passed to the progress callback
CURLOPT_PROGRESSFUNCTIONprogress meter callback
CURLOPT_PROTOCOLS_STRallowed protocols
CURLOPT_PROTOCOLSallowed protocols
CURLOPT_PROXY_CAINFO_BLOBproxy Certificate Authority (CA) bundle in PEM format
CURLOPT_PROXY_CAINFOpath to proxy Certificate Authority (CA) bundle
CURLOPT_PROXY_CAPATHdirectory holding HTTPS proxy CA certificates
CURLOPT_PROXY_CRLFILEHTTPS proxy Certificate Revocation List file
CURLOPT_PROXY_ISSUERCERT_BLOBproxy issuer SSL certificate from memory blob
CURLOPT_PROXY_ISSUERCERTproxy issuer SSL certificate filename
CURLOPT_PROXY_KEYPASSWDpassphrase for the proxy private key
CURLOPT_PROXY_PINNEDPUBLICKEYpinned public key for https proxy
CURLOPT_PROXY_SERVICE_NAMEproxy authentication service name
CURLOPT_PROXY_SSL_CIPHER_LISTciphers to use for HTTPS proxy
CURLOPT_PROXY_SSL_OPTIONSHTTPS proxy SSL behavior options
CURLOPT_PROXY_SSL_VERIFYHOSTverify the proxy certificate's name against host
CURLOPT_PROXY_SSL_VERIFYPEERverify the proxy's SSL certificate
CURLOPT_PROXY_SSLCERT_BLOBSSL proxy client certificate from memory blob
CURLOPT_PROXY_SSLCERTHTTPS proxy client certificate
CURLOPT_PROXY_SSLCERTTYPEtype of the proxy client SSL certificate
CURLOPT_PROXY_SSLKEY_BLOBprivate key for proxy cert from memory blob
CURLOPT_PROXY_SSLKEYprivate keyfile for HTTPS proxy client cert
CURLOPT_PROXY_SSLKEYTYPEtype of the proxy private key file
CURLOPT_PROXY_SSLVERSIONpreferred HTTPS proxy TLS version
CURLOPT_PROXY_TLS13_CIPHERSciphers suites for proxy TLS 1.3
CURLOPT_PROXY_TLSAUTH_PASSWORDpassword to use for proxy TLS authentication
CURLOPT_PROXY_TLSAUTH_TYPEHTTPS proxy TLS authentication methods
CURLOPT_PROXY_TLSAUTH_USERNAMEusername to use for proxy TLS authentication
CURLOPT_PROXY_TRANSFER_MODEappend FTP transfer mode to URL for proxy
CURLOPT_PROXYproxy to use
CURLOPT_PROXYAUTHHTTP proxy authentication methods
CURLOPT_PROXYHEADERset of HTTP headers to pass to proxy
CURLOPT_PROXYPASSWORDpassword to use with proxy authentication
CURLOPT_PROXYPORTport number the proxy listens on
CURLOPT_PROXYTYPEproxy protocol type
CURLOPT_PROXYUSERNAMEusername to use for proxy authentication
CURLOPT_PROXYUSERPWDusername and password to use for proxy authentication
CURLOPT_PUTmake an HTTP PUT request
CURLOPT_QUICK_EXITallow to exit quickly
CURLOPT_QUOTE(S)FTP commands to run before transfer
CURLOPT_RANDOM_FILEfile to read random data from
CURLOPT_RANGEbyte range to request
CURLOPT_READDATApointer passed to the read callback
CURLOPT_READFUNCTIONread callback for data uploads
CURLOPT_REDIR_PROTOCOLS_STRprotocols allowed to redirect to
CURLOPT_REDIR_PROTOCOLSprotocols allowed to redirect to
CURLOPT_REFERERthe HTTP referer header
CURLOPT_REQUEST_TARGETalternative target for this request
CURLOPT_RESOLVEprovide custom hostname to IP address resolves
CURLOPT_RESOLVER_START_DATApointer passed to the resolver start callback
CURLOPT_RESOLVER_START_FUNCTIONcallback called before a new name resolve is started
CURLOPT_RESUME_FROM_LARGEoffset to resume transfer from
CURLOPT_RESUME_FROMoffset to resume transfer from
CURLOPT_RTSP_CLIENT_CSEQRTSP client CSEQ number
CURLOPT_RTSP_REQUESTRTSP request
CURLOPT_RTSP_SERVER_CSEQRTSP server CSEQ number
CURLOPT_RTSP_SESSION_IDRTSP session ID
CURLOPT_RTSP_STREAM_URIRTSP stream URI
CURLOPT_RTSP_TRANSPORTRTSP Transport: header
CURLOPT_SASL_AUTHZIDauthorization identity (identity to act as)
CURLOPT_SASL_IRsend initial response in first packet
CURLOPT_SEEKDATApointer passed to the seek callback
CURLOPT_SEEKFUNCTIONuser callback for seeking in input stream
CURLOPT_SERVER_RESPONSE_TIMEOUTtime in seconds allowed to wait for server response
CURLOPT_SERVER_RESPONSE_TIMEOUT_MStime in milliseconds allowed to wait for server response
CURLOPT_SERVICE_NAMEauthentication service name
CURLOPT_SHAREshare handle to use
CURLOPT_SOCKOPTDATApointer to pass to sockopt callback
CURLOPT_SOCKOPTFUNCTIONcallback for setting socket options
CURLOPT_SOCKS5_AUTHmethods for SOCKS5 proxy authentication
CURLOPT_SOCKS5_GSSAPI_NECsocks proxy gssapi negotiation protection
CURLOPT_SOCKS5_GSSAPI_SERVICESOCKS5 proxy authentication service name
CURLOPT_SSH_AUTH_TYPESauth types for SFTP and SCP
CURLOPT_SSH_COMPRESSIONenable SSH compression
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5MD5 checksum of SSH server public key
CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256SHA256 hash of SSH server public key
CURLOPT_SSH_HOSTKEYDATApointer to pass to the SSH host key callback
CURLOPT_SSH_HOSTKEYFUNCTIONcallback to check host key
CURLOPT_SSH_KEYDATApointer passed to the SSH key callback
CURLOPT_SSH_KEYFUNCTIONcallback for known host matching logic
CURLOPT_SSH_KNOWNHOSTSfilename holding the SSH known hosts
CURLOPT_SSH_PRIVATE_KEYFILEprivate key file for SSH auth
CURLOPT_SSH_PUBLIC_KEYFILEpublic key file for SSH auth
CURLOPT_SSL_CIPHER_LISTciphers to use for TLS
CURLOPT_SSL_CTX_DATApointer passed to ssl_ctx callback
CURLOPT_SSL_CTX_FUNCTIONSSL context callback for OpenSSL, wolfSSL or mbedTLS
CURLOPT_SSL_EC_CURVESkey exchange curves
CURLOPT_SSL_ENABLE_ALPNApplication Layer Protocol Negotiation
CURLOPT_SSL_ENABLE_NPNuse NPN
CURLOPT_SSL_FALSESTARTTLS false start
CURLOPT_SSL_OPTIONSSSL behavior options
CURLOPT_SSL_SESSIONID_CACHEuse the SSL session-ID cache
CURLOPT_SSL_VERIFYHOSTverify the certificate's name against host
CURLOPT_SSL_VERIFYPEERverify the peer's SSL certificate
CURLOPT_SSL_VERIFYSTATUSverify the certificate's status
CURLOPT_SSLCERT_BLOBSSL client certificate from memory blob
CURLOPT_SSLCERTSSL client certificate
CURLOPT_SSLCERTTYPEtype of client SSL certificate
CURLOPT_SSLENGINE_DEFAULTmake SSL engine default
CURLOPT_SSLENGINESSL engine identifier
CURLOPT_SSLKEY_BLOBprivate key for client cert from memory blob
CURLOPT_SSLKEYprivate keyfile for TLS and SSL client cert
CURLOPT_SSLKEYTYPEtype of the private key file
CURLOPT_SSLVERSIONpreferred TLS/SSL version
CURLOPT_STDERRredirect stderr to another stream
CURLOPT_STREAM_DEPENDS_Estream this transfer depends on exclusively
CURLOPT_STREAM_DEPENDSstream this transfer depends on
CURLOPT_STREAM_WEIGHTnumerical stream weight
CURLOPT_SUPPRESS_CONNECT_HEADERSsuppress proxy CONNECT response headers from user callbacks
CURLOPT_TCP_FASTOPENTCP Fast Open
CURLOPT_TCP_KEEPALIVETCP keep-alive probing
CURLOPT_TCP_KEEPIDLETCP keep-alive idle time wait
CURLOPT_TCP_KEEPINTVLTCP keep-alive interval
CURLOPT_TCP_NODELAYthe TCP_NODELAY option
CURLOPT_TELNETOPTIONSset of telnet options
CURLOPT_TFTP_BLKSIZETFTP block size
CURLOPT_TFTP_NO_OPTIONSsend no TFTP options requests
CURLOPT_TIMECONDITIONselect condition for a time request
CURLOPT_TIMEOUT_MSmaximum time the transfer is allowed to complete
CURLOPT_TIMEOUTmaximum time the transfer is allowed to complete
CURLOPT_TIMEVALUE_LARGEtime value for conditional
CURLOPT_TIMEVALUEtime value for conditional
CURLOPT_TLS13_CIPHERSciphers suites to use for TLS 1.3
CURLOPT_TLSAUTH_PASSWORDpassword to use for TLS authentication
CURLOPT_TLSAUTH_TYPETLS authentication methods
CURLOPT_TLSAUTH_USERNAMEusername to use for TLS authentication
CURLOPT_TRAILERDATApointer passed to trailing headers callback
CURLOPT_TRAILERFUNCTIONcallback for sending trailing headers
CURLOPT_TRANSFER_ENCODINGask for HTTP Transfer Encoding
CURLOPT_TRANSFERTEXTrequest a text based transfer for FTP
CURLOPT_UNIX_SOCKET_PATHUnix domain socket
CURLOPT_UNRESTRICTED_AUTHsend credentials to other hosts too
CURLOPT_UPKEEP_INTERVAL_MSconnection upkeep interval
CURLOPT_UPLOAD_BUFFERSIZEupload buffer size
CURLOPT_UPLOADdata upload
CURLOPT_URLURL for this transfer
CURLOPT_USE_SSLrequest using SSL / TLS for the transfer
CURLOPT_USERAGENTHTTP user-agent header
CURLOPT_USERNAMEusername to use in authentication
CURLOPT_USERPWDusername and password to use in authentication
CURLOPT_VERBOSEverbose mode
CURLOPT_WILDCARDMATCHdirectory wildcard transfers
CURLOPT_WRITEDATApointer passed to the write callback
CURLOPT_WRITEFUNCTIONcallback for writing received data
CURLOPT_WS_OPTIONSWebSocket behavior options
CURLOPT_XFERINFODATApointer passed to the progress callback
CURLOPT_XFERINFOFUNCTIONprogress meter callback
CURLOPT_XOAUTH2_BEAREROAuth 2.0 access token