Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
#include <curl/curl.h>
int main(int argc, char *argv[]) {
CURLcode ret;
CURL *hnd;
hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_URL, "");
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);
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