Collection Info

View Source
Collection
vendor
Path
curl
Entries
511

Source Files

(hidden platform specific files)

Constants

309

ALTSVC_READONLYFILE #

Source
ALTSVC_READONLYFILE :: 1 << 2

CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option

AUTH_GSSAPI #

Source
AUTH_GSSAPI :: AUTH_NEGOTIATE

Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct

AUTH_GSSNEGOTIATE #

Source
AUTH_GSSNEGOTIATE :: AUTH_NEGOTIATE

Deprecated since the advent of CURLAUTH_NEGOTIATE

BLOB_COPY #

Source
BLOB_COPY :: blob_flags{.COPY}

Flag bits in the curl_blob struct:

BLOB_NOCOPY #

Source
BLOB_NOCOPY :: blob_flags{}

tell libcurl to NOT copy the data

CHUNK_BGN_FUNC_FAIL #

Source
CHUNK_BGN_FUNC_FAIL :: 1

tell the lib to end the task

CHUNK_BGN_FUNC_OK #

Source
CHUNK_BGN_FUNC_OK :: 0

return codes for CURLOPT_CHUNK_BGN_FUNCTION

CHUNK_BGN_FUNC_SKIP #

Source
CHUNK_BGN_FUNC_SKIP :: 2

skip this chunk over

CHUNK_END_FUNC_FAIL #

Source
CHUNK_END_FUNC_FAIL :: 1

tell the lib to end the task

CHUNK_END_FUNC_OK #

Source
CHUNK_END_FUNC_OK :: 0

return codes for CURLOPT_CHUNK_END_FUNCTION

FINFOFLAG_KNOWN_FILENAME #

Source
FINFOFLAG_KNOWN_FILENAME :: finfoflags{.KNOWN_FILENAME}

FINFOFLAG_KNOWN_FILETYPE #

Source
FINFOFLAG_KNOWN_FILETYPE :: finfoflags{.KNOWN_FILETYPE}

FINFOFLAG_KNOWN_GID #

Source
FINFOFLAG_KNOWN_GID :: finfoflags{.KNOWN_GID}

FINFOFLAG_KNOWN_HLINKCOUNT #

Source
FINFOFLAG_KNOWN_HLINKCOUNT :: finfoflags{.KNOWN_HLINKCOUNT}

FINFOFLAG_KNOWN_PERM #

Source
FINFOFLAG_KNOWN_PERM :: finfoflags{.KNOWN_PERM}

FINFOFLAG_KNOWN_SIZE #

Source
FINFOFLAG_KNOWN_SIZE :: finfoflags{.KNOWN_SIZE}

FINFOFLAG_KNOWN_TIME #

Source
FINFOFLAG_KNOWN_TIME :: finfoflags{.KNOWN_TIME}

FINFOFLAG_KNOWN_UID #

Source
FINFOFLAG_KNOWN_UID :: finfoflags{.KNOWN_UID}

FNMATCHFUNC_MATCH #

Source
FNMATCHFUNC_MATCH :: 0

return codes for FNMATCHFUNCTION

FNMATCHFUNC_NOMATCH #

Source
FNMATCHFUNC_NOMATCH :: 1

pattern does not match the string

FOLLOW_ALL #

Source
FOLLOW_ALL :: 1

bits for the CURLOPT_FOLLOWLOCATION option

FOLLOW_FIRSTONLY #

Source
FOLLOW_FIRSTONLY :: 3

Only use the custom method in the first request, always reset in the next

FOLLOW_OBEYCODE #

Source
FOLLOW_OBEYCODE :: 2

Do not use the custom method in the follow-up request if the HTTP code instructs so (301, 302, 303).

GSSAPI_DELEGATION_FLAG #

Source
GSSAPI_DELEGATION_FLAG :: 1 << 1

delegate always

GSSAPI_DELEGATION_NONE #

Source
GSSAPI_DELEGATION_NONE :: 0

no delegation (default)

GSSAPI_DELEGATION_POLICY_FLAG #

Source
GSSAPI_DELEGATION_POLICY_FLAG :: 1 << 0

if permitted by policy

H_CONNECT #

Source
H_CONNECT :: header_origin_bits{.H_CONNECT}

CONNECT headers

H_HEADER #

Source
H_HEADER :: header_origin_bits{.H_HEADER}

plain server header

H_PSEUDO #

Source
H_PSEUDO :: header_origin_bits{.H_PSEUDO}

pseudo headers

H_TRAILER #

Source
H_TRAILER :: header_origin_bits{.H_TRAILER}

trailers

HEADER_UNIFIED #

Source
HEADER_UNIFIED :: 0

bitmask defines for CURLOPT_HEADEROPT

HET_DEFAULT #

Source
HET_DEFAULT :: 200

The default connection attempt delay in milliseconds for happy eyeballs. CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document this value, keep them in sync.

HSTS_ENABLE #

Source
HSTS_ENABLE :: (c.long)(1 << 0)

CURLHSTS_* are bits for the CURLOPT_HSTS option

HTTP_VERSION_1_0 #

Source
HTTP_VERSION_1_0 :: 1

please use HTTP 1.0 in the request

HTTP_VERSION_1_1 #

Source
HTTP_VERSION_1_1 :: 2

please use HTTP 1.1 in the request

HTTP_VERSION_2 #

Source
HTTP_VERSION_2 :: HTTP_VERSION_2_0

Convenience definition simple because the name of the version is HTTP/2 and not 2.0. The 2_0 version of the enum name was set while the version was still planned to be 2.0 and we stick to it for compatibility.

HTTP_VERSION_2_0 #

Source
HTTP_VERSION_2_0 :: 3

please use HTTP 2 in the request

HTTP_VERSION_2_PRIOR_KNOWLEDGE #

Source
HTTP_VERSION_2_PRIOR_KNOWLEDGE :: 5

please use HTTP 2 without HTTP/1.1 Upgrade

HTTP_VERSION_2TLS #

Source
HTTP_VERSION_2TLS :: 4

use version 2 for HTTPS, version 1.1 for HTTP

HTTP_VERSION_3 #

Source
HTTP_VERSION_3 :: 30

Use HTTP/3, fallback to HTTP/2 or HTTP/1 if needed. For HTTPS only. For HTTP, this option makes libcurl return error.

HTTP_VERSION_3ONLY #

Source
HTTP_VERSION_3ONLY :: 31

Use HTTP/3 without fallback. For HTTPS only. For HTTP, this makes libcurl return error.

HTTP_VERSION_LAST #

Source
HTTP_VERSION_LAST :: 32

*ILLEGAL* http version

HTTP_VERSION_NONE #

Source
HTTP_VERSION_NONE :: 0

These constants are for use with the CURLOPT_HTTP_VERSION option.

HTTPPOST_CALLBACK #

Source
HTTPPOST_CALLBACK :: httppost_flags{.CALLBACK}

HTTPPOST_FILENAME #

Source
HTTPPOST_FILENAME :: httppost_flags{.FILENAME}

HTTPPOST_PTRBUFFER #

Source
HTTPPOST_PTRBUFFER :: httppost_flags{.PTRBUFFER}

HTTPPOST_PTRCONTENTS #

Source
HTTPPOST_PTRCONTENTS :: httppost_flags{.PTRCONTENTS}

HTTPPOST_PTRNAME #

Source
HTTPPOST_PTRNAME :: httppost_flags{.PTRNAME}

HTTPPOST_READFILE #

Source
HTTPPOST_READFILE :: httppost_flags{.READFILE}

IPRESOLVE_V4 #

Source
IPRESOLVE_V4 :: 1

uses only IPv4 addresses/connections

IPRESOLVE_V6 #

Source
IPRESOLVE_V6 :: 2

uses only IPv6 addresses/connections

IPRESOLVE_WHATEVER #

Source
IPRESOLVE_WHATEVER :: 0

Below here follows defines for the CURLOPT_IPRESOLVE option. If a host name resolves addresses using more than one IP protocol version, this option might be handy to force libcurl to use a specific IP version.

MAX_HTTP_HEADER #

Source
MAX_HTTP_HEADER :: 100 * 1024

The only reason to have a max limit for this is to avoid the risk of a bad server feeding libcurl with a never-ending header that will cause reallocs infinitely

MAX_READ_SIZE #

Source
MAX_READ_SIZE :: 10 * 1024 * 1024

The maximum receive buffer size.

MAX_WRITE_SIZE #

Source
MAX_WRITE_SIZE :: 16384

Tests have proven that 20K is a bad buffer size for uploads on Windows, while 16K for some odd reason performed a lot better. We do the ifndef check to allow this value to easier be changed at build time for those who feel adventurous. The practical minimum is about 400 bytes since libcurl uses a buffer of this size as a scratch area (unrelated to network send operations).

MIMEOPT_FORMESCAPE #

Source
MIMEOPT_FORMESCAPE :: 1 << 0

CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option.

MNWC_CLEAR_CONNS #

Source
MNWC_CLEAR_CONNS :: 1 << 0

- CURLMNWC_CLEAR_CONNS tells libcurl to prevent further reuse of existing connections. Connections that are idle will be closed. Ongoing transfers will continue with the connection they have.

MNWC_CLEAR_DNS #

Source
MNWC_CLEAR_DNS :: 1 << 0

- CURLMNWC_CLEAR_DNS tells libcurl to prevent further reuse of existing connections. Connections that are idle will be closed. Ongoing transfers will continue with the connection they have.

NETRC_IGNORED #

Source
NETRC_IGNORED :: 0

These enums are for use with the CURLOPT_NETRC option.

NETRC_OPTIONAL #

Source
NETRC_OPTIONAL :: 1

A user:password in the URL will be preferred to one in the .netrc.

NETRC_REQUIRED #

Source
NETRC_REQUIRED :: 2

A user:password in the URL will be ignored. Unless one is set programmatically, the .netrc will be queried.

OPTTYPE_CBPOINT #

Source
OPTTYPE_CBPOINT :: OPTTYPE_OBJECTPOINT

'void *' argument passed untouched to callback

OPTTYPE_LONG #

Source
OPTTYPE_LONG :: 0

long may be 32 or 64 bits, but we should never depend on anything else but 32

OPTTYPE_SLISTPOINT #

Source
OPTTYPE_SLISTPOINT :: OPTTYPE_OBJECTPOINT

'struct curl_slist *' argument

OPTTYPE_STRINGPOINT #

Source
OPTTYPE_STRINGPOINT :: OPTTYPE_OBJECTPOINT

'char *' argument to a string with a trailing zero

OPTTYPE_VALUES #

Source
OPTTYPE_VALUES :: OPTTYPE_LONG

'long' argument with a set of values/bitmask

PIPE_NOTHING #

Source
PIPE_NOTHING :: 0

bitmask bits for CURLMOPT_PIPELINING

POLL_NONE #

Source
POLL_NONE :: 0

* Name: curl_multi_socket() and * curl_multi_socket_all() * * Desc: An alternative version of curl_multi_perform() that allows the * application to pass in one of the file descriptors that have been * detected to have "action" on them and let libcurl perform. * See manpage for details.

PREREQFUNC_ABORT #

Source
PREREQFUNC_ABORT :: 1

Return code for when the pre-request callback wants to abort the request

PREREQFUNC_OK #

Source
PREREQFUNC_OK :: 0

Return code for when the pre-request callback has terminated without any errors

PROGRESSFUNC_CONTINUE #

Source
PROGRESSFUNC_CONTINUE :: 0x10000001

This is a return code for the progress callback that, when returned, will signal libcurl to continue executing the default progress function

PT_RTSPHEADER #

Source
PT_RTSPHEADER :: option.HTTPHEADER

Convenient "aliases"

PUSH_OK #

Source
PUSH_OK :: 0

* Name: curl_push_callback * * Desc: This callback gets called when a new stream is being pushed by the * server. It approves or denies the new stream. It can also decide * to completely fail the connection. * * Returns: CURL_PUSH_OK, CURL_PUSH_DENY or CURL_PUSH_ERROROUT

READFUNC_ABORT #

Source
READFUNC_ABORT :: 0x10000000

This is a return code for the read callback that, when returned, will signal libcurl to immediately abort the current transfer.

READFUNC_PAUSE #

Source
READFUNC_PAUSE :: 0x10000001

This is a return code for the read callback that, when returned, will signal libcurl to pause sending data on the current transfer.

REDIR_POST_ALL #

Source
REDIR_POST_ALL :: REDIR_POST_301 | REDIR_POST_302 | REDIR_POST_303

SEEKFUNC_CANTSEEK #

Source
SEEKFUNC_CANTSEEK :: 2

tell libcurl seeking cannot be done, so libcurl might try other means instead

SEEKFUNC_OK #

Source
SEEKFUNC_OK :: 0

These are the return codes for the seek callbacks

SOCKOPT_ERROR #

Source
SOCKOPT_ERROR :: 1

causes libcurl to abort and return CURLE_ABORTED_BY_CALLBACK

SOCKOPT_OK #

Source
SOCKOPT_OK :: 0

The return code from the sockopt_callback can signal information back to libcurl:

SSH_AUTH_AGENT #

Source
SSH_AUTH_AGENT :: 1 << 4

agent (ssh-agent, pageant...)

SSH_AUTH_ANY #

Source
SSH_AUTH_ANY :: ~c.int(0)

all types supported by the server

SSH_AUTH_GSSAPI #

Source
SSH_AUTH_GSSAPI :: 1 << 5

gssapi (kerberos, ...)

SSH_AUTH_KEYBOARD #

Source
SSH_AUTH_KEYBOARD :: 1 << 3

keyboard interactive

SSH_AUTH_NONE #

Source
SSH_AUTH_NONE :: 0

none allowed, silly but complete

SSH_AUTH_PUBLICKEY #

Source
SSH_AUTH_PUBLICKEY :: 1 << 0

public/private key files

SSLOPT_ALLOW_BEAST #

Source
SSLOPT_ALLOW_BEAST :: 1 << 0

- ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the name of improving interoperability with older servers. Some SSL libraries have introduced work-arounds for this flaw but those work-arounds sometimes make the SSL communication fail. To regain functionality with those broken servers, a user can this way allow the vulnerability back.

SSLOPT_AUTO_CLIENT_CERT #

Source
SSLOPT_AUTO_CLIENT_CERT :: 1 << 5

- CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use a client certificate for authentication. (Schannel)

SSLOPT_EARLYDATA #

Source
SSLOPT_EARLYDATA :: 1 << 6

If possible, send data using TLS 1.3 early data

SSLOPT_NATIVE_CA #

Source
SSLOPT_NATIVE_CA :: 1 << 4

- CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of operating system. Currently implemented under MS-Windows.

SSLOPT_NO_PARTIALCHAIN #

Source
SSLOPT_NO_PARTIALCHAIN :: 1 << 2

- NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain if possible. The OpenSSL backend has this ability.

SSLOPT_NO_REVOKE #

Source
SSLOPT_NO_REVOKE :: 1 << 1

- NO_REVOKE tells libcurl to disable certificate revocation checks for those SSL backends where such behavior is present.

SSLOPT_REVOKE_BEST_EFFORT #

Source
SSLOPT_REVOKE_BEST_EFFORT :: 1 << 3

- REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline checks and ignore missing revocation list for those SSL backends where such behavior is present.

SSLVERSION_MAX_DEFAULT #

Source
SSLVERSION_MAX_DEFAULT :: SSLVERSION_TLSv1 << 16

SSLVERSION_MAX_LAST #

Source
SSLVERSION_MAX_LAST :: SSLVERSION_LAST << 16

never use, keep last

SSLVERSION_MAX_TLSv1_0 #

Source
SSLVERSION_MAX_TLSv1_0 :: SSLVERSION_TLSv1_0 << 16

SSLVERSION_MAX_TLSv1_1 #

Source
SSLVERSION_MAX_TLSv1_1 :: SSLVERSION_TLSv1_1 << 16

SSLVERSION_MAX_TLSv1_2 #

Source
SSLVERSION_MAX_TLSv1_2 :: SSLVERSION_TLSv1_2 << 16

SSLVERSION_MAX_TLSv1_3 #

Source
SSLVERSION_MAX_TLSv1_3 :: SSLVERSION_TLSv1_3 << 16

TIMESTAMP #

Source
TIMESTAMP :: "2025-11-05"

* This is the date and time when the full source package was created. The * timestamp is not stored in git, as the timestamp is properly set in the * tarballs by the maketgz script. * * The format of the date follows this template: * * "2007-11-23"

TRAILERFUNC_ABORT #

Source
TRAILERFUNC_ABORT :: 1

Return code for when was an error in the trailing header's list and we want to abort the request

TRAILERFUNC_OK #

Source
TRAILERFUNC_OK :: 0

Return code for when the trailing headers' callback has terminated without any errors

U_DEFAULT_SCHEME #

Source
U_DEFAULT_SCHEME :: UFlags{.DEFAULT_SCHEME}

U_NO_DEFAULT_PORT #

Source
U_NO_DEFAULT_PORT :: UFlags{.NO_DEFAULT_PORT}

U_NO_GUESS_SCHEME #

Source
U_NO_GUESS_SCHEME :: UFlags{.NO_GUESS_SCHEME}

U_NON_SUPPORT_SCHEME #

Source
U_NON_SUPPORT_SCHEME :: UFlags{.NON_SUPPORT_SCHEME}

ULFLAG_ANSWERED #

Source
ULFLAG_ANSWERED :: 1 << 0

bitmask values for CURLOPT_UPLOAD_FLAGS

UPKEEP_INTERVAL_DEFAULT #

Source
UPKEEP_INTERVAL_DEFAULT :: 60000

The default connection upkeep interval in milliseconds.

USESSL_ALL #

Source
USESSL_ALL :: 3

SSL for all communication or fail

USESSL_CONTROL #

Source
USESSL_CONTROL :: 2

SSL for the control connection or fail

USESSL_NONE #

Source
USESSL_NONE :: 0

parameter for the CURLOPT_USE_SSL option

USESSL_TRY #

Source
USESSL_TRY :: 1

try using SSL, proceed anyway otherwise

VERSION #

Source
VERSION :: "8.17.0"

This is the version number of the libcurl package from which this header file origins:

VERSION_ALTSVC #

Source
VERSION_ALTSVC :: 1 << 24

Alt-Svc handling built-in

VERSION_ASYNCHDNS #

Source
VERSION_ASYNCHDNS :: 1 << 7

Asynchronous DNS resolves

VERSION_BROTLI #

Source
VERSION_BROTLI :: 1 << 23

Brotli features are present.

VERSION_CONV #

Source
VERSION_CONV :: 1 << 12

Character conversions supported

VERSION_CURLDEBUG #

Source
VERSION_CURLDEBUG :: 1 << 13

Debug memory tracking supported

VERSION_DEBUG #

Source
VERSION_DEBUG :: 1 << 6

Built with debug capabilities

VERSION_GSASL #

Source
VERSION_GSASL :: 1 << 29

libgsasl is supported

VERSION_GSSAPI #

Source
VERSION_GSSAPI :: 1 << 17

Built against a GSS-API library

VERSION_GSSNEGOTIATE #

Source
VERSION_GSSNEGOTIATE :: 1 << 5

Negotiate auth is supported (deprecated)

VERSION_HTTP2 #

Source
VERSION_HTTP2 :: 1 << 16

HTTP2 support built-in

VERSION_HTTP3 #

Source
VERSION_HTTP3 :: 1 << 25

HTTP3 support built-in

VERSION_HTTPS_PROXY #

Source
VERSION_HTTPS_PROXY :: 1 << 21

HTTPS-proxy support built-in

VERSION_IDN #

Source
VERSION_IDN :: 1 << 10

Internationized Domain Names are supported

VERSION_KERBEROS4 #

Source
VERSION_KERBEROS4 :: 1 << 1

Kerberos V4 auth is supported (deprecated)

VERSION_KERBEROS5 #

Source
VERSION_KERBEROS5 :: 1 << 18

Kerberos V5 auth is supported

VERSION_LARGEFILE #

Source
VERSION_LARGEFILE :: 1 << 9

Supports files larger than 2GB

VERSION_LIBZ #

Source
VERSION_LIBZ :: 1 << 3

libz features are present

VERSION_MAJOR #

Source
VERSION_MAJOR :: 8

The numeric version number is also available "in parts" by using these defines:

VERSION_MULTI_SSL #

Source
VERSION_MULTI_SSL :: 1 << 22

Multiple SSL backends available

VERSION_NOW #

Source
VERSION_NOW :: version_enum.TWELFTH

The 'CURLVERSION_NOW' is the symbolic name meant to be used by basically all programs ever that want to get version information. It is meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above.

VERSION_NTLM_WB #

Source
VERSION_NTLM_WB :: 1 << 15

NTLM delegation to winbind helper is supported

VERSION_NUM #

Source
VERSION_NUM :: 0x081100

This is the numeric version of the libcurl version number, meant for easier parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will always follow this syntax: 0xXXYYZZ Where XX, YY and ZZ are the main version, release and patch numbers in hexadecimal (using 8 bits each). All three numbers are always represented using two digits. 1.2 would appear as "0x010200" while version 9.11.7 appears as "0x090b07". This 6-digit (24 bits) hexadecimal number does not show pre-release number, and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work. Note: This define is the full hex number and _does not_ use the CURL_VERSION_BITS() macro since curl's own configure script greps for it and needs it to contain the full number.

VERSION_PSL #

Source
VERSION_PSL :: 1 << 20

Mozilla's Public Suffix List, used for cookie domain verification

VERSION_SPNEGO #

Source
VERSION_SPNEGO :: 1 << 8

SPNEGO auth is supported

VERSION_SSPI #

Source
VERSION_SSPI :: 1 << 11

Built against Windows SSPI

VERSION_THREADSAFE #

Source
VERSION_THREADSAFE :: 1 << 30

libcurl API is thread-safe

VERSION_TLSAUTH_SRP #

Source
VERSION_TLSAUTH_SRP :: 1 << 14

TLS-SRP auth is supported

VERSION_UNICODE #

Source
VERSION_UNICODE :: 1 << 27

Unicode support on Windows

VERSION_UNIX_SOCKETS #

Source
VERSION_UNIX_SOCKETS :: 1 << 19

Unix domain sockets support

VERSION_ZSTD #

Source
VERSION_ZSTD :: 1 << 26

zstd features are present

WAIT_POLLIN #

Source
WAIT_POLLIN :: 0x0001

Based on poll(2) structure and values. * We do not use pollfd and POLL* constants explicitly * to cover platforms without poll().

WRITEFUNC_ERROR #

Source
WRITEFUNC_ERROR :: 0xFFFFFFFF

This is a magic return code for the write callback that, when returned, will signal an error from the callback.

WRITEFUNC_PAUSE #

Source
WRITEFUNC_PAUSE :: 0x10000001

This is a magic return code for the write callback that, when returned, will signal libcurl to pause receiving on the current transfer.

WS_RAW_MODE #

Source
WS_RAW_MODE :: 1 << 0

bits for the CURLOPT_WS_OPTIONS bitmask:

ZERO_TERMINATED #

Source
ZERO_TERMINATED :: ~c.size_t(0)

Special size_t value signaling a null-terminated string.

Types

117

certinfo #

Source
certinfo :: certinfo

info about the certificate chain, for SSL backends that support it. Asked for with CURLOPT_CERTINFO / CURLINFO_CERTINFO

chunk_bgn_callback #

Source
chunk_bgn_callback :: chunk_bgn_callback

if splitting of data transfer is enabled, this callback is called before download of an individual chunk started. Note that parameter "remains" works only for FTP wildcard downloading (for now), otherwise is not used

chunk_end_callback #

Source
chunk_end_callback :: chunk_end_callback

If splitting of data transfer is enabled this callback is called after download of an individual chunk finished. Note! After this callback was set then it have to be called FOR ALL chunks. Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. This is the reason why we do not need "transfer_info" parameter in this callback and we are not interested in "remains" parameter too.

code #

Source
code :: code

All possible error codes from all sorts of curl functions. Future versions may return other values, stay prepared. Always add new return codes last. Never *EVER* remove any. The return codes must remain the same!

easyoption #

Source
easyoption :: easyoption

The CURLOPTTYPE_* id ranges can still be used to figure out what type/size to use for curl_easy_setopt() for the given id

fileinfo #

Source
fileinfo :: fileinfo

Information about a single file, used when doing FTP wildcard matching

fnmatch_callback #

Source
fnmatch_callback :: fnmatch_callback

callback type for wildcard downloading pattern matching. If the string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc.

formget_callback #

Source
formget_callback :: formget_callback

* callback function for curl_formget() * The void *arg pointer will be the one passed as second argument to * curl_formget(). * The character buffer passed to it must not be freed. * Should return the buffer length passed to it as the argument "len" on * success.

khstat #

Source
khstat :: khstat

this is the set of return values expected from the curl_sshkeycallback callback

malloc_callback #

Source
malloc_callback :: malloc_callback

* The following typedef's are signatures of malloc, free, realloc, strdup and * calloc respectively. Function pointers of these types can be passed to the * curl_global_init_mem() function to set user defined memory management * callback routines.

multi_timer_callback #

Source
multi_timer_callback :: multi_timer_callback

* Name: curl_multi_timer_callback * * Desc: Called by libcurl whenever the library detects a change in the * maximum number of milliseconds the app is allowed to wait before * curl_multi_socket() or curl_multi_perform() must be called * (to allow libcurl's timed events to take place). * * Returns: The callback should return zero.

progress_callback #

Source
progress_callback :: progress_callback

This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now considered deprecated but was the only choice up until 7.31.0

proxycode #

Source
proxycode :: proxycode

* Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was * return for the transfers.

ssl_backend #

Source
ssl_backend :: ssl_backend

* NAME curl_global_sslset() * * DESCRIPTION * * When built with multiple SSL backends, curl_global_sslset() allows to * choose one. This function can only be called once, and it must be called * *before* curl_global_init(). * * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The * backend can also be specified via the name parameter (passing -1 as id). If * both id and name are specified, the name will be ignored. If neither id nor * name are specified, the function will fail with CURLSSLSET_UNKNOWN_BACKEND * and set the "avail" pointer to the NULL-terminated list of available * backends. * * Upon success, the function returns CURLSSLSET_OK. * * If the specified SSL backend is not available, the function returns * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a * NULL-terminated list of available SSL backends. * * The SSL backend can be set only once. If it has already been set, a * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.

ssls_export_cb #

Source
ssls_export_cb :: ssls_export_cb

This is the curl_ssls_export_cb callback prototype. It is passed to curl_easy_ssls_export() to extract SSL sessions/tickets.

tlssessioninfo #

Source
tlssessioninfo :: tlssessioninfo

Information about the SSL library used and the respective internal SSL handle, which can be used to obtain further information regarding the connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION.

xferinfo_callback #

Source
xferinfo_callback :: xferinfo_callback

This is the CURLOPT_XFERINFOFUNCTION callback prototype. It was introduced in 7.32.0, avoids the use of floating point numbers and provides more detailed information.

Procedures

85

easy_duphandle #

Source
easy_duphandle :: proc "c" (curl: ^CURL) -> ^CURL ---

* NAME curl_easy_duphandle() * * DESCRIPTION * * Creates a new curl session handle with the same options set for the handle * passed in. Duplicating a handle could only be a matter of cloning data and * options, internal state info and things like persistent connections cannot * be transferred. It is useful in multithreaded applications when you can run * curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_setopt() invokes in every thread.

easy_escape #

Source
easy_escape :: proc "c" (handle: ^CURL, string: cstring, length: i32) -> cstring ---

* NAME curl_easy_escape() * * DESCRIPTION * * Escapes URL strings (converts all letters consider illegal in URLs to their * %XX versions). This function returns a new allocated string or NULL if an * error occurred.

easy_getinfo #

Source
easy_getinfo :: proc "c" (curl: ^CURL, info: INFO, args: ..any) -> code ---

* NAME curl_easy_getinfo() * * DESCRIPTION * * Request internal information from the curl session with this function. * The third argument MUST be pointing to the specific type of the used option * which is documented in each manpage of the option. The data pointed to * will be filled in accordingly and can be relied upon only if the function * returns CURLE_OK. This function is intended to get used *AFTER* a performed * transfer, all results from this function are undefined until the transfer * is completed.

easy_pause #

Source
easy_pause :: proc "c" (handle: ^CURL, bitmask: u32) -> code ---

* NAME curl_easy_pause() * * DESCRIPTION * * The curl_easy_pause function pauses or unpauses transfers. Select the new * state by setting the bitmask, use the convenience defines below. *

easy_recv #

Source
easy_recv :: proc "c" (curl: ^CURL, buffer: rawptr, buflen: uint, n: ^uint) -> code ---

* NAME curl_easy_recv() * * DESCRIPTION * * Receives data from the connected socket. Use after successful * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.

easy_reset #

Source
easy_reset :: proc "c" (curl: ^CURL) ---

* NAME curl_easy_reset() * * DESCRIPTION * * Re-initializes a curl handle to the default values. This puts back the * handle to the same state as it was in when it was just created. * * It does keep: live connections, the Session ID cache, the DNS cache and the * cookies.

easy_send #

Source
easy_send :: proc "c" (curl: ^CURL, buffer: rawptr, buflen: uint, n: ^uint) -> code ---

* NAME curl_easy_send() * * DESCRIPTION * * Sends data over the connected socket. Use after successful * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.

easy_ssls_export #

Source
easy_ssls_export :: proc "c" (handle: ^CURL, export_fn: ssls_export_cb, userptr: rawptr) -> code ---

* NAME curl_easy_ssls_export() * * DESCRIPTION * * The curl_easy_ssls_export function iterates over all SSL sessions stored * in the easy handle (or underlying share) and invokes the passed * callback. *

easy_ssls_import #

Source
easy_ssls_import :: proc "c" (
	handle:      ^CURL, 
	session_key: cstring, 
	shmac:       [^]u8, 
	shmac_len:   uint, 
	sdata:       [^]u8, 
	sdata_len:   uint, 
) -> code ---

* NAME curl_easy_ssls_import() * * DESCRIPTION * * The curl_easy_ssls_import function adds a previously exported SSL session * to the SSL session cache of the easy handle (or the underlying share).

easy_strerror #

Source
easy_strerror :: proc "c" (code) -> cstring ---

* NAME curl_easy_strerror() * * DESCRIPTION * * The curl_easy_strerror function may be used to turn a CURLcode value * into the equivalent human readable error string. This is useful * for printing meaningful error messages.

easy_unescape #

Source
easy_unescape :: proc "c" (handle: ^CURL, string: cstring, length: i32, outlength: ^i32) -> cstring ---

* NAME curl_easy_unescape() * * DESCRIPTION * * Unescapes URL encoding in strings (converts all %XX codes to their 8bit * versions). This function returns a new allocated string or NULL if an error * occurred. * Conversion Note: On non-ASCII platforms the ASCII %XX codes are * converted into the host encoding.

easy_upkeep #

Source
easy_upkeep :: proc "c" (curl: ^CURL) -> code ---

* NAME curl_easy_upkeep() * * DESCRIPTION * * Performs connection upkeep for the given session handle.

free #

Source
free :: proc "c" (p: rawptr) ---

* NAME curl_free() * * DESCRIPTION * * Provided for de-allocation in the same translation unit that did the * allocation. Added in libcurl 7.10

getdate #

Source
getdate :: proc "c" (p: cstring, unused: ^time_t) -> time_t ---

* NAME curl_getdate() * * DESCRIPTION * * Returns the time, in seconds since 1 Jan 1970 of the time string given in * the first argument. The time argument in the second parameter is unused * and should be set to NULL.

getenv #

Source
getenv :: proc "c" (variable: cstring) -> cstring ---

* NAME curl_getenv() * * DESCRIPTION * * Returns a malloc()'ed string that MUST be curl_free()ed after usage is * complete. DEPRECATED - see lib/README.curlx

global_cleanup #

Source
global_cleanup :: proc "c" () ---

* NAME curl_global_cleanup() * * DESCRIPTION * * curl_global_cleanup() should be invoked exactly once for each application * that uses libcurl

global_init #

Source
global_init :: proc "c" (flags: i32) -> code ---

* NAME curl_global_init() * * DESCRIPTION * * curl_global_init() should be invoked exactly once for each application that * uses libcurl and before any call of other libcurl functions. * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the * curl_version_info_data.features flag (fetch by curl_version_info()).

global_init_mem #

Source
global_init_mem :: proc "c" (
	flags: i32, 
	m:     malloc_callback, 
	f:     free_callback, 
	r:     realloc_callback, 
	s:     strdup_callback, 
	c:     calloc_callback, 
) -> code ---

* NAME curl_global_init_mem() * * DESCRIPTION * * curl_global_init() or curl_global_init_mem() should be invoked exactly once * for each application that uses libcurl. This function can be used to * initialize libcurl and set user defined memory management callback * functions. Users can implement memory management routines to check for * memory leaks, check for mis-use of the curl library etc. User registered * callback routines will be invoked by this library instead of the system * memory management routines like malloc, free etc.

global_trace #

Source
global_trace :: proc "c" (config: cstring) -> code ---

* NAME curl_global_trace() * * DESCRIPTION * * curl_global_trace() can be invoked at application start to * configure which components in curl should participate in tracing. * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the * curl_version_info_data.features flag (fetch by curl_version_info()).

mime_addpart #

Source
mime_addpart :: proc "c" (mime: ^mime) -> ^mimepart ---

* NAME curl_mime_addpart() * * DESCRIPTION * * Append a new empty part to the given mime context and return a handle to * the created part.

mime_data #

Source
mime_data :: proc "c" (part: ^mimepart, data: [^]u8, datasize: uint) -> code ---

* NAME curl_mime_data() * * DESCRIPTION * * Set mime part data source from memory data,

mime_encoder #

Source
mime_encoder :: proc "c" (part: ^mimepart, encoding: cstring) -> code ---

* NAME curl_mime_encoder() * * DESCRIPTION * * Set mime data transfer encoder.

mime_filedata #

Source
mime_filedata :: proc "c" (part: ^mimepart, filename: rawptr) -> code ---

* NAME curl_mime_filedata() * * DESCRIPTION * * Set mime part data source from named file.

mime_filename #

Source
mime_filename :: proc "c" (part: ^mimepart, filename: cstring) -> code ---

* NAME curl_mime_filename() * * DESCRIPTION * * Set mime part remote filename.

mime_free #

Source
mime_free :: proc "c" (mime: ^mime) ---

* NAME curl_mime_free() * * DESCRIPTION * * release a mime handle and its substructures.

mime_headers #

Source
mime_headers :: proc "c" (part: ^mimepart, headers: ^slist, take_ownership: i32) -> code ---

* NAME curl_mime_headers() * * DESCRIPTION * * Set mime part headers.

mime_init #

Source
mime_init :: proc "c" (easy: ^CURL) -> ^mime ---

* NAME curl_mime_init() * * DESCRIPTION * * Create a mime context and return its handle. The easy parameter is the * target handle.

mime_subparts #

Source
mime_subparts :: proc "c" (part: ^mimepart, subparts: ^mime) -> code ---

* NAME curl_mime_subparts() * * DESCRIPTION * * Set mime part data source from subparts.

multi_add_handle #

Source
multi_add_handle :: proc "c" (multi_handle: ^CURLM, curl_handle: ^CURL) -> Mcode ---

* Name: curl_multi_add_handle() * * Desc: add a standard curl handle to the multi stack * * Returns: CURLMcode type, general multi error code.

multi_assign #

Source
multi_assign :: proc "c" (multi_handle: ^CURLM, sockfd: socket_t, sockp: rawptr) -> Mcode ---

* Name: curl_multi_assign() * * Desc: This function sets an association in the multi handle between the * given socket and a private pointer of the application. This is * (only) useful for curl_multi_socket uses. * * Returns: CURLM error code.

multi_cleanup #

Source
multi_cleanup :: proc "c" (multi_handle: ^CURLM) -> Mcode ---

* Name: curl_multi_cleanup() * * Desc: Cleans up and removes a whole multi stack. It does not free or * touch any individual easy handles in any way. We need to define * in what state those handles will be if this function is called * in the middle of a transfer. * * Returns: CURLMcode type, general multi error code.

multi_fdset #

Source
multi_fdset :: proc "c" (multi_handle: ^CURLM, read_fd_set: ^fd_set, write_fd_set: ^fd_set, exc_fd_set: ^fd_set, max_fd: ^i32) -> Mcode ---

* Name: curl_multi_fdset() * * Desc: Ask curl for its fd_set sets. The app can use these to select() or * poll() on. We want curl_multi_perform() called as soon as one of * them are ready. * * Returns: CURLMcode type, general multi error code.

multi_get_handles #

Source
multi_get_handles :: proc "c" (multi_handle: ^CURLM) -> [^]^CURL ---

* Name: curl_multi_get_handles() * * Desc: Returns an allocated array holding all handles currently added to * the multi handle. Marks the final entry with a NULL pointer. If * there is no easy handle added to the multi handle, this function * returns an array with the first entry as a NULL pointer. * * Returns: NULL on failure, otherwise a CURL **array pointer

multi_get_offt #

Source
multi_get_offt :: proc "c" (multi_handle: ^CURLM, info: Minfo, value: ^i64) -> Mcode ---

* Name: curl_multi_get_offt() * * Desc: Retrieves a numeric value for the `CURLMINFO_*` enums. * * Returns: CULRM_OK or error when value could not be obtained.

multi_info_read #

Source
multi_info_read :: proc "c" (multi_handle: ^CURLM, msgs_in_queue: ^i32) -> ^Msg ---

* Name: curl_multi_info_read() * * Desc: Ask the multi handle if there is any messages/informationals from * the individual transfers. Messages include informationals such as * error code from the transfer or just the fact that a transfer is * completed. More details on these should be written down as well. * * Repeated calls to this function will return a new struct each * time, until a special "end of msgs" struct is returned as a signal * that there is no more to get at this point. * * The data the returned pointer points to will not survive calling * curl_multi_cleanup(). * * The 'CURLMsg' struct is meant to be simple and only contain basic * information. If more involved information is wanted, we will * provide the particular "transfer handle" in that struct and that * should/could/would be used in subsequent curl_easy_getinfo() calls * (or similar). The point being that we must never expose complex * structs to applications, as then we will undoubtably get backwards * compatibility problems in the future. * * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out * of structs. It also writes the number of messages left in the * queue (after this read) in the integer the second argument points * to.

multi_init #

Source
multi_init :: proc "c" () -> ^CURLM ---

* Name: curl_multi_init() * * Desc: initialize multi-style curl usage * * Returns: a new CURLM handle to use in all 'curl_multi' functions.

multi_perform #

Source
multi_perform :: proc "c" (multi_handle: ^CURLM, running_handles: ^i32) -> Mcode ---

* Name: curl_multi_perform() * * Desc: When the app thinks there is data available for curl it calls this * function to read/write whatever there is right now. This returns * as soon as the reads and writes are done. This function does not * require that there actually is data available for reading or that * data can be written, it can be called just in case. It returns * the number of handles that still transfer data in the second * argument's integer-pointer. * * Returns: CURLMcode type, general multi error code. *NOTE* that this only * returns errors etc regarding the whole multi stack. There might * still have occurred problems on individual transfers even when * this returns OK.

multi_poll #

Source
multi_poll :: proc "c" (multi_handle: ^CURLM, extra_fds: [^]waitfd, extra_nfds: u32, timeout_ms: i32, ret: ^i32) -> Mcode ---

* Name: curl_multi_poll() * * Desc: Poll on all fds within a CURLM set as well as any * additional fds passed to the function. * * Returns: CURLMcode type, general multi error code.

multi_remove_handle #

Source
multi_remove_handle :: proc "c" (multi_handle: ^CURLM, curl_handle: ^CURL) -> Mcode ---

* Name: curl_multi_remove_handle() * * Desc: removes a curl handle from the multi stack again * * Returns: CURLMcode type, general multi error code.

multi_setopt #

Source
multi_setopt :: proc "c" (multi_handle: ^CURLM, option: Moption, args: ..any) -> Mcode ---

* Name: curl_multi_setopt() * * Desc: Sets options for the multi handle. * * Returns: CURLM error code.

multi_strerror #

Source
multi_strerror :: proc "c" (Mcode) -> cstring ---

* Name: curl_multi_strerror() * * Desc: The curl_multi_strerror function may be used to turn a CURLMcode * value into the equivalent human readable error string. This is * useful for printing meaningful error messages. * * Returns: A pointer to a null-terminated error message.

multi_timeout #

Source
multi_timeout :: proc "c" (multi_handle: ^CURLM, milliseconds: ^i32) -> Mcode ---

* Name: curl_multi_timeout() * * Desc: Returns the maximum number of milliseconds the app is allowed to * wait before curl_multi_socket() or curl_multi_perform() must be * called (to allow libcurl's timed events to take place). * * Returns: CURLM error code.

multi_wait #

Source
multi_wait :: proc "c" (multi_handle: ^CURLM, extra_fds: [^]waitfd, extra_nfds: u32, timeout_ms: i32, ret: ^i32) -> Mcode ---

* Name: curl_multi_wait() * * Desc: Poll on all fds within a CURLM set as well as any * additional fds passed to the function. * * Returns: CURLMcode type, general multi error code.

multi_waitfds #

Source
multi_waitfds :: proc "c" (multi: ^CURLM, ufds: [^]waitfd, size: u32, fd_count: ^u32) -> Mcode ---

* Name: curl_multi_waitfds() * * Desc: Ask curl for fds for polling. The app can use these to poll on. * We want curl_multi_perform() called as soon as one of them are * ready. Passing zero size allows to get just a number of fds. * * Returns: CURLMcode type, general multi error code.

multi_wakeup #

Source
multi_wakeup :: proc "c" (multi_handle: ^CURLM) -> Mcode ---

* Name: curl_multi_wakeup() * * Desc: wakes up a sleeping curl_multi_poll call. * * Returns: CURLMcode type, general multi error code.

share_strerror #

Source
share_strerror :: proc "c" (SHcode) -> cstring ---

* NAME curl_share_strerror() * * DESCRIPTION * * The curl_share_strerror function may be used to turn a CURLSHcode value * into the equivalent human readable error string. This is useful * for printing meaningful error messages.

slist_append #

Source
slist_append :: proc "c" (list: ^slist, data: cstring) -> ^slist ---

* NAME curl_slist_append() * * DESCRIPTION * * Appends a string to a linked list. If no list exists, it will be created * first. Returns the new list, after appending.

slist_free_all #

Source
slist_free_all :: proc "c" (list: ^slist) ---

* NAME curl_slist_free_all() * * DESCRIPTION * * free a previously built curl_slist.

strequal #

Source
strequal :: proc "c" (s1, s2: cstring) -> i32 ---

curl_strequal() and curl_strnequal() are subject for removal in a future release

url #

Source
url :: proc "c" () -> ^CURLU ---

* curl_url() creates a new CURLU handle and returns a pointer to it. * Must be freed with curl_url_cleanup().

url_cleanup #

Source
url_cleanup :: proc "c" (handle: ^CURLU) ---

* curl_url_cleanup() frees the CURLU handle and related resources used for * the URL parsing. It will not free strings previously returned with the URL * API.

url_dup #

Source
url_dup :: proc "c" (input: ^CURLU) -> ^CURLU ---

* curl_url_dup() duplicates a CURLU handle and returns a new copy. The new * handle must also be freed with curl_url_cleanup().

url_get #

Source
url_get :: proc "c" (handle: ^CURLU, what: UPart, part: ^[^]u8, flags: UFlags) -> ^Ucode ---

* curl_url_get() extracts a specific part of the URL from a CURLU * handle. Returns error code. The returned pointer MUST be freed with * curl_free() afterwards.

url_set #

Source
url_set :: proc "c" (handle: ^CURLU, what: UPart, part: cstring, flags: UFlags) -> Ucode ---

* curl_url_set() sets a specific part of the URL in a CURLU handle. Returns * error code. The passed in string will be copied. Passing a NULL instead of * a part string, clears that part.

url_strerror #

Source
url_strerror :: proc "c" (Ucode) -> cstring ---

* curl_url_strerror() turns a CURLUcode value into the equivalent human * readable error string. This is useful for printing meaningful error * messages.

version #

Source
version :: proc "c" () -> cstring ---

* NAME curl_version() * * DESCRIPTION * * Returns a static ASCII string of the libcurl version.

version_info #

Source
version_info :: proc "c" (version_enum) -> ^version_info_data ---

* NAME curl_version_info() * * DESCRIPTION * * This function returns a pointer to a static copy of the version info * struct. See above.

ws_recv #

Source
ws_recv :: proc "c" (curl: ^CURL, buffer: rawptr, buflen: uint, recv: ^uint, metap: ^^ws_frame) -> code ---

* NAME curl_ws_recv() * * DESCRIPTION * * Receives data from the websocket connection. Use after successful * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.

ws_send #

Source
ws_send :: proc "c" (
	curl:     ^CURL, 
	buffer:   rawptr, 
	buflen:   uint, 
	sent:     ^uint, 
	fragsize: i64, 
	flags:    ws_flags, 
) -> code ---

* NAME curl_ws_send() * * DESCRIPTION * * Sends data over the websocket connection. Use after successful * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.

ws_start_frame #

Source
ws_start_frame :: proc "c" (curl: ^CURL, flags: u32, frame_len: i64) -> code ---

* NAME curl_ws_start_frame() * * DESCRIPTION * * Buffers a websocket frame header with the given flags and length. * Errors when a previous frame is not complete, e.g. not all its * payload has been added.