Skip to content

Instantly share code, notes, and snippets.

@florianleibert
Created February 29, 2012 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florianleibert/1942462 to your computer and use it in GitHub Desktop.
Save florianleibert/1942462 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <stdio.h>
#include <curl/curl.h>
using std::cout;
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://google.com");
res = curl_easy_perform(curl);
cout << res;
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment