Skip to content

Instantly share code, notes, and snippets.

@pushmon pushmon/c

Created Apr 2, 2014
Embed
What would you like to do?
C Language
<#if filename>
c_.txt
<#elseif title>
C
<#elseif logo>
//dmnv44fd3imdv.cloudfront.net/www.pushmon.com/img/code/java.gif
<#elseif code>
#include <stdio.h>
#include <curl.h>
int main(int agrc, char **argv) {
CURL *curl;
CURLcode res;
char *url = "${urlstring}";
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, url);
res = curl_easy_perform(curl);
if (res == CURLE_OK) {
printf("OK");
}
else {
printf("Error: %s", curl_easy_strerror(res));
}
curl_easy_cleanup(curl);
}
return 0;
}
</#if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.