encodings
enctype
endianness
+enums
Engler
enum
epoll
curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L);
/* If-Modified-Since the above time stamp */
- curl_easy_setopt(curl, CURLOPT_TIMECONDITION,
- (long)CURL_TIMECOND_IFMODSINCE);
+ curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
/* Perform the request */
res = curl_easy_perform(curl);
{
CURL *curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long)CURLALTSVC_H1);
+ curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1);
curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt");
curl_easy_perform(curl);
}
}
~~~
+# HISTORY
+
+**CURLALTSVC_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# FILE FORMAT
A text based file with one line per alt-svc entry and each line consists of
~~~c
#include <curl/curl.h>
-#define CURLALTSVC_READONLYFILE (1<<2)
-#define CURLALTSVC_H1 (1<<3)
-#define CURLALTSVC_H2 (1<<4)
-#define CURLALTSVC_H3 (1<<5)
+#define CURLALTSVC_READONLYFILE (1L<<2)
+#define CURLALTSVC_H1 (1L<<3)
+#define CURLALTSVC_H2 (1L<<4)
+#define CURLALTSVC_H3 (1L<<5)
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC_CTRL, long bitmask);
~~~
{
CURL *curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long)CURLALTSVC_H1);
+ curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1);
curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt");
curl_easy_perform(curl);
}
}
~~~
+# HISTORY
+
+**CURLALTSVC_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
/* funny server, ask for SSL before TLS */
- curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, (long)CURLFTPAUTH_SSL);
+ curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
+# HISTORY
+
+**CURLFTPAUTH_*** enums became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/non-existing/new.txt");
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
- (long)CURLFTP_CREATE_DIR_RETRY);
+ CURLFTP_CREATE_DIR_RETRY);
res = curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURLFTP_CREATE_*** enums became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/1/2/3/4/new.txt");
- curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD,
- (long)CURLFTPMETHOD_SINGLECWD);
+ curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD);
res = curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURLFTPMETHOD_*** enums became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
/* go back to clear-text FTP after authenticating */
- curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, (long)CURLFTPSSL_CCC_ACTIVE);
+ curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
+# HISTORY
+
+**CURLFTPSSL_*** enums became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* delegate if okayed by policy */
curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION,
- (long)CURLGSSAPI_DELEGATION_POLICY_FLAG);
+ CURLGSSAPI_DELEGATION_POLICY_FLAG);
ret = curl_easy_perform(curl);
}
}
~~~
+# HISTORY
+
+**CURLGSSAPI_DELEGATION_*** macros became `long` types in 8.16.0, prior to this
+version a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
/* HTTPS over a proxy makes a separate CONNECT to the proxy, so tell
libcurl to not send the custom headers to the proxy. Keep them
separate. */
- curl_easy_setopt(curl, CURLOPT_HEADEROPT, (long)CURLHEADER_SEPARATE);
+ curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
ret = curl_easy_perform(curl);
curl_slist_free_all(list);
curl_easy_cleanup(curl);
}
~~~
+# HISTORY
+
+**CURLHEADER_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
{
CURL *curl = curl_easy_init();
if(curl) {
- curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, (long)CURLHSTS_ENABLE);
+ curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
curl_easy_perform(curl);
}
}
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* allow whatever auth the server speaks */
- curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
+ curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond");
ret = curl_easy_perform(curl);
}
CURLAUTH_NTLM_WB was added in 7.22.0
+**CURLAUTH_*** macros became `long` types in 7.26.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
CURLAUTH_BEARER was added in 7.61.0
CURLAUTH_AWS_SIGV4 was added in 7.74.0
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
- curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2TLS);
+ curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
ret = curl_easy_perform(curl);
if(ret == CURLE_HTTP_RETURNED_ERROR) {
/* an HTTP response error problem */
}
~~~
+# HISTORY
+
+**CURL_HTTP_VERSION_*** enums became `long` types in 8.13.0, prior to this
+version a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
/* of all addresses example.com resolves to, only IPv6 ones are used */
- curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V6);
+ curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
res = curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURL_IPRESOLVE_*** macros became `long` types in 8.15.0, before this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
- curl_easy_setopt(curl, CURLOPT_MIME_OPTIONS, (long)CURLMIMEOPT_FORMESCAPE);
+ curl_easy_setopt(curl, CURLOPT_MIME_OPTIONS, CURLMIMEOPT_FORMESCAPE);
form = curl_mime_init(curl);
if(form) {
}
~~~
+# HISTORY
+
+**CURLMIMEOPT_FORMESCAPE** macro became `long` type in 8.16.0, prior to this
+version a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
}
~~~
+# HISTORY
+
+**CURL_NETRC_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
}
~~~
+# HISTORY
+
+**CURL_NETRC_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* size of the POST data */
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) strlen(data));
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(data));
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
/* example.com is redirected, so we tell libcurl to send POST on 301,
302 and 303 HTTP response codes */
- curl_easy_setopt(curl, CURLOPT_POSTREDIR, (long)CURL_REDIR_POST_ALL);
+ curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
curl_easy_perform(curl);
}
This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the
301 then. CURL_REDIR_POST_303 was added in 7.26.0.
+**CURL_REDIR_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
/* only allow HTTP, TFTP and SFTP */
curl_easy_setopt(curl, CURLOPT_PROTOCOLS,
- (long)CURLPROTO_HTTP | CURLPROTO_TFTP | CURLPROTO_SFTP);
+ CURLPROTO_HTTP | CURLPROTO_TFTP | CURLPROTO_SFTP);
/* Perform the request */
curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURLPROTO_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# DEPRECATED
Deprecated since 7.85.0.
}
~~~
+# HISTORY
+
+**CURLAUTH_*** macros became `long` types in 7.26.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080");
/* set the proxy type */
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5);
+ curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
+# HISTORY
+
+**CURLPROXY_*** enums became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* ask libcurl to use TLS version 1.0 or later */
- curl_easy_setopt(curl, CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1);
+ curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
/* Perform the request */
curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURL_SSLVERSION_*** macros became `long` types in 8.16.0, prior to this
+version a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy");
/* weaken TLS only for use with silly proxies */
- curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS, (long)
+ curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
~~~
+# HISTORY
+
+**CURLSSLOPT_*** macros became `long` types in 8.15.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
/* only allow redirects to HTTP and HTTPS URLs */
- curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, (long)
+ curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS,
CURLPROTO_HTTP | CURLPROTO_HTTPS);
/* Perform the request */
}
~~~
+# HISTORY
+
+**CURLPROTO_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# DEPRECATED
Deprecated since 7.85.0.
}
~~~
+# HISTORY
+
+**CURL_RTSPREQ_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
}
~~~
+# HISTORY
+
+**CURL_RTSPREQ_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://user:pass@myproxy.com");
/* enable username/password authentication only */
- curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, (long)CURLAUTH_BASIC);
+ curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, CURLAUTH_BASIC);
/* Perform the request */
curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURLAUTH_*** macros became `long` types in 7.26.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
- curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, (long)
+ curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES,
CURLSSH_AUTH_PUBLICKEY | CURLSSH_AUTH_KEYBOARD);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
~~~
+# HISTORY
+
+**CURLSSH_AUTH_*** macros became `long` types in 8.16.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* ask libcurl to use TLS version 1.0 or later */
- curl_easy_setopt(curl, CURLOPT_SSLVERSION, (long)CURL_SSLVERSION_TLSv1);
+ curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
/* Perform the request */
curl_easy_perform(curl);
Rustls support added in 8.10.0.
+**CURL_SSLVERSION_*** macros became `long` types in 8.16.0, prior to this
+version a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
/* weaken TLS only for use with silly servers */
- curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_ALLOW_BEAST |
- CURLSSLOPT_NO_REVOKE);
+ curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
+ CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
+# HISTORY
+
+**CURLSSLOPT_*** macros became `long` types in 8.15.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L);
/* If-Modified-Since the above time stamp */
- curl_easy_setopt(curl, CURLOPT_TIMECONDITION,
- (long)CURL_TIMECOND_IFMODSINCE);
+ curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
/* Perform the request */
curl_easy_perform(curl);
}
~~~
+# HISTORY
+
+**CURL_TIMECOND_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
}
~~~
+# HISTORY
+
+**CURL_TIMECOND_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
}
~~~
+# HISTORY
+
+**CURL_TIMECOND_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/file.ext");
/* require use of SSL for this, or fail */
- curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
/* Perform the request */
curl_easy_perform(curl);
This option was known as CURLOPT_FTP_SSL up to 7.16.4. Supported by LDAP since
7.81.0. Fully supported by the OpenLDAP backend only.
+**CURLUSESSL_*** enums became `long` types in 8.13.0, prior to this version
+a `long` cast was necessary when passed to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "ws://example.com/");
/* tell curl we deal with all the WebSocket magic ourselves */
- curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, (long)CURLWS_RAW_MODE);
+ curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_RAW_MODE);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~
+# HISTORY
+
+**CURLWS_RAW_MODE** and **CURLWS_NOAUTOPONG** macros became `long` types
+in 8.16.0, prior to this version a `long` cast was necessary when passed
+to curl_easy_setopt(3).
+
# %AVAILABILITY%
# RETURN VALUE
while(s/\W(CURL(AUTH|E|H|MOPT|OPT|SHOPT|UE|M|SSH|SSLBACKEND|HEADER|FORM|FTP|PIPE|MIMEOPT|GSSAPI|ALTSVC|PROTO|PROXY|UPART|USESSL|_READFUNC|_WRITEFUNC|_CSELECT|_FORMADD|_IPRESOLVE|_REDIR|_RTSPREQ|_TIMECOND|_VERSION)_[a-zA-Z0-9_]+)//) {
my $s = $1;
# skip two "special" ones
- if($s !~ /^(CURLE_OBSOLETE|CURLOPT_TEMPLATE)/) {
+ if($s !~ /(^(CURLE_OBSOLETE|CURLOPT_TEMPLATE))|_$/) {
push @manrefs, "$1:$m:$line";
}
}