Anonymous user
HTTPS: Difference between revisions
Fixed whitespace and replaced declarations.
(Fixed import so is more general.) |
(Fixed whitespace and replaced declarations.) |
||
Line 63:
=={{header|C}}==
{{libheader|libcurl}}
<lang c>#include <stdio.h>
#include <stdlib.h>
#include <curl/curl.h>
int main(void) {
if ((curl = curl_easy_init()) != NULL) {
curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
▲ CURL *curl;
▲ char buffer[CURL_ERROR_SIZE];
if (curl_easy_perform(curl
▲ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
▲ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, buffer);
▲ return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}</lang>
=={{header|C sharp|C#}}==
|