-
-
Save pushmon/9935515 to your computer and use it in GitHub Desktop.
C Language
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#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