Last active
May 25, 2016 01:50
-
-
Save lettergram/9bcd19241944c57865fcfdd21ed741c0 to your computer and use it in GitHub Desktop.
This file contains 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
/********* Sample code generated by the curl command line tool ********** | |
* All curl_easy_setopt() options are documented at: | |
* https://curl.haxx.se/libcurl/c/curl_easy_setopt.html | |
************************************************************************/ | |
#include <curl/curl.h> | |
int main(int argc, char *argv[]) { | |
CURLcode ret; | |
CURL *hnd; | |
hnd = curl_easy_init(); | |
curl_easy_setopt(hnd, CURLOPT_URL, "http://austingwalters.com"); | |
curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L); | |
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.48.0"); | |
curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L); | |
curl_easy_setopt(hnd, CURLOPT_SSH_KNOWNHOSTS, "/home/austin/.ssh/known_hosts"); | |
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L); | |
ret = curl_easy_perform(hnd); | |
curl_easy_cleanup(hnd); | |
hnd = NULL; | |
return (int)ret; | |
} | |
/**** End of sample code ****/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment