mirror of
https://github.com/curl/curl.git
synced 2026-06-07 08:44:17 +03:00
restore casts in docs
This commit is contained in:
parent
6455805b88
commit
6770ab7c14
7 changed files with 9 additions and 7 deletions
|
|
@ -54,7 +54,8 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L);
|
||||
|
||||
/* If-Modified-Since the above time stamp */
|
||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION,
|
||||
(long)CURL_TIMECOND_IFMODSINCE);
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ int main(void)
|
|||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
|
||||
curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, (long)CURLHSTS_ENABLE);
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ int main(void)
|
|||
CURLcode ret;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* allow whatever auth the server speaks */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
|
||||
curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond");
|
||||
ret = curl_easy_perform(curl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ int main(void)
|
|||
if(curl) {
|
||||
CURLcode ret;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2TLS);
|
||||
ret = curl_easy_perform(curl);
|
||||
if(ret == CURLE_HTTP_RETURNED_ERROR) {
|
||||
/* an HTTP response error problem */
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://user:pass@myproxy.com");
|
||||
|
||||
/* enable username/password authentication only */
|
||||
curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, CURLAUTH_BASIC);
|
||||
curl_easy_setopt(curl, CURLOPT_SOCKS5_AUTH, (long)CURLAUTH_BASIC);
|
||||
|
||||
/* Perform the request */
|
||||
curl_easy_perform(curl);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L);
|
||||
|
||||
/* If-Modified-Since the above time stamp */
|
||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION,
|
||||
(long)CURL_TIMECOND_IFMODSINCE);
|
||||
|
||||
/* Perform the request */
|
||||
curl_easy_perform(curl);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int main(void)
|
|||
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, CURLUSESSL_ALL);
|
||||
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
|
||||
|
||||
/* Perform the request */
|
||||
curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue