CurlOption

Values

ValueMeaning
file10_001

This is the FILE * or void * the regular output should be written to.

url

The full URL to get/put

port3

Port number to connect to, if other than default.

proxy10_004

Name of proxy to use.

userpwd

"name:password" to use when fetching.

proxyuserpwd

"name:password" to use with proxy.

range

Range to get, specified as an ASCII string.

infile10_009

Specified file stream to upload from (use as input):

errorbuffer

Buffer to receive error messages in, must be at least CURL_ERROR_SIZE * bytes big. If this is not used, error messages go to stderr instead:

writefunction20_011

Function that will be called to store the output (instead of fwrite). The * parameters will use fwrite() syntax, make sure to follow them.

readfunction

Function that will be called to read the input (instead of fread). The * parameters will use fread() syntax, make sure to follow them.

timeout13

Time-out the read operation after this amount of seconds

infilesize

If the CURLOPT_INFILE is used, this can be used to inform libcurl about how large the file being sent really is. That allows better error checking and better verifies that the upload was successful. -1 means unknown size.

For large file support, there is also a _LARGE version of the key which takes an off_t type, allowing platforms with larger off_t sizes to handle larger files. See below for INFILESIZE_LARGE.

postfields10_015

POST static input fields.

referer

Set the referrer page (needed by some CGIs)

ftpport

Set the FTP PORT string (interface name, named or numerical IP address) Use i.e '-' to use default address.

useragent

Set the User-Agent string (examined by some CGIs)

low_speed_limit19

Set the "low speed limit"

low_speed_time

Set the "low speed time"

resume_from

Set the continuation offset.

Note there is also a _LARGE version of this key which uses off_t types, allowing for large file offsets on platforms which use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.

httpheader

This points to a linked list of headers, struct curl_slist kind

httppost

This points to a linked list of post entries, struct curl_httppost

sslcert

name of the file keeping your private SSL-certificate

keypasswd

password for the SSL or SSH private key

crlf27

send TYPE parameter?

quote10_028

send linked-list of QUOTE commands

writeheader

send FILE * or void * to store headers to, if you use a callback it is simply passed to the callback unmodified

cookiefile10_031

point to a file to read the initial cookies from, also enables "cookie awareness"

sslversion32

What version to specifically try to use. See CURL_SSLVERSION defines below.

timecondition

What kind of HTTP time condition to use, see defines

timevalue

Time to use with the above condition. Specified in number of seconds since 1 Jan 1970

customrequest10_036

Custom request, for customizing the get command like HTTP: DELETE, TRACE and others FTP: to use a different list command

stderr

HTTP request, for odd commands like DELETE, TRACE and others

postquote10_039

send linked-list of post-transfer QUOTE commands

writeinfo

Pass a pointer to string of the output using full variable-replacement as described elsewhere.

verbose41

talk a lot

noprogress

shut off the progress meter

nobody

use HEAD to get http document

failonerror

no output on http error codes >= 300

upload

this is an upload

post

HTTP POST method

dirlistonly

return bare names when listing directories

append50

Append instead of overwrite on upload!

netrc

Specify whether to read the user+password from the .netrc or the URL. * This must be one of the CURL_NETRC_* enums below.

followlocation

use Location: Luke!

transfertext

transfer data in text/ASCII format

put

HTTP PUT

progressfunction20_056

Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback * prototype defines.

progressdata10_057

Data passed to the progress callback

autoreferer58

We want the referrer field set automatically when following locations

proxyport

Port of the proxy, can be set in the proxy string as well with: [host]:[port]

postfieldsize

size of the POST input data, if strlen() is not good to use

httpproxytunnel

tunnel non-http operations through a HTTP proxy

intrface10_062

Set the interface string to use as outgoing network interface

krblevel

Set the krb4/5 security level, this also enables krb4/5 awareness. This * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string * is set but doesn't match one of these, 'private' will be used.

ssl_verifypeer64

Set if we should verify the peer in ssl handshake, set 1 to verify.

cainfo10_065

The CApath or CAfile used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true

maxredirs68

Maximum number of http redirects to follow

filetime

Pass a long set to 1 to get the date of the requested document (if possible)! Pass a zero to shut it off.

telnetoptions10_070

This points to a linked list of telnet options

maxconnects71

Max amount of cached alive connections

closepolicy

What policy to use when closing connections when the cache is filled up

fresh_connect74

Set to explicitly use a new connection for the upcoming transfer. Do not use this unless you're absolutely sure of this, as it makes the operation slower and is less friendly for the network.

forbid_reuse

Set to explicitly forbid the upcoming transfer's connection to be re-used when done. Do not use this unless you're absolutely sure of this, as it makes the operation slower and is less friendly for the network.

random_file10_076

Set to a file name that contains random data for libcurl to use to seed the random engine when doing SSL connects.

egdsocket

Set to the Entropy Gathering Daemon socket pathname

connecttimeout78

Time-out connect operations after this amount of seconds, if connects are OK within this time, then fine... This only aborts the connect phase. [Only works on unix-style/SIGALRM operating systems]

headerfunction20_079

Function that will be called to store headers (instead of fwrite). The * parameters will use fwrite() syntax, make sure to follow them.

httpget80

Set this to force the HTTP request to get back to GET. Only really usable if POST, PUT or a custom request have been used first.

ssl_verifyhost

Set if we should verify the Common name from the peer certificate in ssl * handshake, set 1 to check existence, 2 to ensure that it matches the * provided hostname.

cookiejar10_082

Specify which file name to write all known cookies in after completed operation. Set file name to "-" (dash) to make it go to stdout.

ssl_cipher_list

Specify which SSL ciphers to use

http_version84

Specify which HTTP version to use! This must be set to one of the CURL_HTTP_VERSION* enums set below.

ftp_use_epsv

Specifically switch on or off the FTP engine's use of the EPSV command. By default, that one will always be attempted before the more traditional PASV command.

sslcerttype10_086

type of the file keeping your SSL-certificate ("DER", "PEM", "ENG")

sslkey

name of the file keeping your private SSL-key

sslkeytype

type of the file keeping your private SSL-key ("DER", "PEM", "ENG")

sslengine

crypto engine for the SSL-sub system

sslengine_default90

set the crypto engine for the SSL-sub system as default the param has no meaning...

dns_use_global_cache

Non-zero value means to use the global dns cache

dns_cache_timeout

DNS cache timeout

prequote10_093

send linked-list of pre-transfer QUOTE commands

debugfunction20_094

set the debug function

debugdata10_095

set the data for the debug function

cookiesession96

mark this as start of a cookie session

capath10_097

The CApath directory used to validate the peer certificate this option is used only if SSL_VERIFYPEER is true

buffersize98

Instruct libcurl to use a smaller receive buffer

nosignal

Instruct libcurl to not use any signal/alarm handlers, even when using timeouts. This option is useful for multi-threaded applications. See libcurl-the-guide for more background information.

share10_100

Provide a CURLShare for mutexing non-ts data

proxytype101

indicates type of proxy. accepted values are CURLPROXY_HTTP (default), CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5.

encoding10_102

Set the Accept-Encoding string. Use this to tell a server you would like the response to be compressed.

private_opt

Set pointer to private data

http200aliases

Set aliases for HTTP 200 in the HTTP Response header

unrestricted_auth105

Continue to send authentication (user+password) when following locations, even when hostname changed. This can potentially send off the name and password to whatever host the server decides.

ftp_use_eprt

Specifically switch on or off the FTP engine's use of the EPRT command ( it also disables the LPRT attempt). By default, those ones will always be attempted before the good old traditional PORT command.

httpauth

Set this to a bitmask value to enable the particular authentications methods you like. Use this in combination with CURLOPT_USERPWD. Note that setting multiple bits may cause extra network round-trips.

ssl_ctx_function20_108

Set the ssl context callback function, currently only for OpenSSL ssl_ctx in second argument. The function must be matching the curl_ssl_ctx_callback proto.

ssl_ctx_data10_109

Set the userdata for the ssl context callback function's third argument

ftp_create_missing_dirs110

FTP Option that causes missing dirs to be created on the remote server. In 7.19.4 we introduced the convenience enums for this option using the CURLFTP_CREATE_DIR prefix.

proxyauth

Set this to a bitmask value to enable the particular authentications methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. Note that setting multiple bits may cause extra network round-trips.

ftp_response_timeout

FTP option that changes the timeout, in seconds, associated with getting a response. This is different from transfer timeout time and essentially places a demand on the FTP server to acknowledge commands in a timely manner.

ipresolve

Set this option to one of the CURL_IPRESOLVE_* defines (see below) to tell libcurl to resolve names to those IP versions only. This only has affect on systems with support for more than one, i.e IPv4 _and_ IPv6.

maxfilesize

Set this option to limit the size of a file that will be downloaded from an HTTP or FTP server.

Note there is also _LARGE version which adds large file support for platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below.

infilesize_large30_115

See the comment for INFILESIZE above, but in short, specifies the size of the file being uploaded. -1 means unknown.

resume_from_large

Sets the continuation offset. There is also a LONG version of this; look above for RESUME_FROM.

maxfilesize_large

Sets the maximum size of data that will be downloaded from an HTTP or FTP server. See MAXFILESIZE above for the LONG version.

netrc_file10_118

Set this option to the file name of your .netrc file you want libcurl to parse (using the CURLOPT_NETRC option). If not set, libcurl will do a poor attempt to find the user's home directory and check for a .netrc file in there.

use_ssl119

Enable SSL/TLS for FTP, pick one of: CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise CURLFTPSSL_CONTROL - SSL for the control connection or fail CURLFTPSSL_ALL - SSL for all communication or fail

postfieldsize_large30_120

The _LARGE version of the standard POSTFIELDSIZE option

tcp_nodelay121

Enable/disable the TCP Nagle algorithm

ftpsslauth129

When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option can be used to change libcurl's default action which is to first try "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK response has been received.

Available parameters are: CURLFTPAUTH_DEFAULT - let libcurl decide CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL

ioctlfunction20_130
ioctldata10_131
ftp_account10_134

zero terminated string for pass on to the FTP server when asked for "account" info

cookielist

feed cookies into cookie engine

ignore_content_length136

ignore Content-Length

ftp_skip_pasv_ip

Set to non-zero to skip the IP address received in a 227 PASV FTP server response. Typically used for FTP-SSL purposes but is not restricted to that. libcurl will then instead use the same IP address it used for the control connection.

ftp_filemethod

Select "file method" to use when doing FTP, see the curl_ftpmethod above.

localport

Local port number to bind the socket to

localportrange

Number of ports to try, including the first one set with LOCALPORT. Thus, setting it to 1 will make no additional attempts but the first.

connect_only

no transfer, set up connection and let application use the socket by extracting it with CURLINFO_LASTSOCKET

conv_from_network_function20_142

Function that will be called to convert from the network encoding (instead of using the iconv calls in libcurl)

conv_to_network_function

Function that will be called to convert to the network encoding (instead of using the iconv calls in libcurl)

conv_from_utf8_function

Function that will be called to convert from UTF8 (instead of using the iconv calls in libcurl) Note that this is used only for SSL certificate processing

max_send_speed_large30_145

limit-rate: maximum number of bytes per second to send or receive

max_recv_speed_large

ditto

ftp_alternative_to_user10_147

Pointer to command string to send if USER/PASS fails.

sockoptfunction20_148

callback function for setting socket options

sockoptdata10_149
ssl_sessionid_cache150

set to 0 to disable session ID re-use for this transfer, default is enabled (== 1)

ssh_auth_types

allowed SSH authentication methods

ssh_public_keyfile10_152

Used by scp/sftp to do public/private key authentication

ssh_private_keyfile
ftp_ssl_ccc154

Send CCC (Clear Command Channel) after authentication

timeout_ms

Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution

connecttimeout_ms

ditto

http_transfer_decoding

set to zero to disable the libcurl's decoding and thus pass the raw body data to the application even when it is encoded/compressed

http_content_decoding

ditto

new_file_perms

Permission used when creating new files and directories on the remote server for protocols that support it, SFTP/SCP/FILE

new_directory_perms

ditto

postredir

Set the behaviour of POST when redirecting. Values must be set to one of CURL_REDIR* defines below. This used to be called CURLOPT_POST301

ssh_host_public_key_md510_162

used by scp/sftp to verify the host's public key

opensocketfunction20_163

Callback function for opening socket (instead of socket(2)). Optionally, callback is able change the address or refuse to connect returning CURL_SOCKET_BAD. The callback should have type curl_opensocket_callback

opensocketdata10_164

ditto

copypostfields

POST volatile input fields.

proxy_transfer_mode166

set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy

seekfunction20_167

Callback function for seeking in the input stream

seekdata10_168

ditto

crlfile

CRL file

issuercert

Issuer certificate

address_scope171

(IPv6) Address scope

certinfo

Collect certificate chain info and allow it to get retrievable with CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only working with OpenSSL-powered builds.

username10_173

"name" and "pwd" to use when fetching.

password

ditto

proxyusername

"name" and "pwd" to use with Proxy when fetching.

proxypassword

ditto

noproxy

Comma separated list of hostnames defining no-proxy zones. These should match both hostnames directly, and hostnames within a domain. For example, local.com will match local.com and www.local.com, but NOT notlocal.com or www.notlocal.com. For compatibility with other implementations of this, .local.com will be considered to be the same as local.com. A single * is the only valid wildcard, and effectively disables the use of proxy.

tftp_blksize178

block size for TFTP transfers

socks5_gssapi_service10_179

Socks Service

socks5_gssapi_nec180

Socks Service

protocols

set the bitmask for the protocols that are allowed to be used for the transfer, which thus helps the app which takes URLs from users or other external inputs and want to restrict what protocol(s) to deal with. Defaults to CURLPROTO_ALL.

redir_protocols

set the bitmask for the protocols that libcurl is allowed to follow to, as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs to be set in both bitmasks to be allowed to get redirected to. Defaults to all protocols except FILE and SCP.

ssh_knownhosts10_183

set the SSH knownhost file name to use

ssh_keyfunction20_184

set the SSH host key callback, must point to a curl_sshkeycallback function

ssh_keydata10_185

set the SSH host key callback custom pointer

mail_from

set the SMTP mail originator

mail_rcpt

set the SMTP mail receiver(s)

ftp_use_pret188

FTP: send PRET before PASV

rtsp_request

RTSP request method (OPTIONS, SETUP, PLAY, etc...)

rtsp_session_id10_190

The RTSP session identifier

rtsp_stream_uri

The RTSP stream URI

rtsp_transport

The Transport: header to use in RTSP requests

rtsp_client_cseq193

Manually initialize the client RTSP CSeq for this handle

rtsp_server_cseq

Manually initialize the server RTSP CSeq for this handle

interleavedata10_195

The stream to pass to INTERLEAVEFUNCTION.

interleavefunction20_196

Let the application define a custom write method for RTP data

wildcardmatch197

Turn on wildcard matching

chunk_bgn_function20_198

Directory matching callback called before downloading of an individual file (chunk) started

chunk_end_function

Directory matching callback called after the file (chunk) was downloaded, or skipped

fnmatch_function

Change match (fnmatch-like) callback for wildcard matching

chunk_data10_201

Let the application define custom chunk data pointer

fnmatch_data

FNMATCH_FUNCTION user pointer

resolve

send linked-list of name:port:address sets

tlsauth_username

Set a username for authenticated TLS

tlsauth_password

Set a password for authenticated TLS

tlsauth_type

Set authentication type for authenticated TLS

lastentry

the last unused

writedatafile

convenient alias

readdatainfile

ditto

headerdatawriteheader

ditto

rtspheaderhttpheader

ditto

Meta