I believe you should take a look to this sample code from the libcurl Example source codes :
Then change the URL
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://example.com");
and implement your own logic in :
static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
Then you may want to save the server answer in a std::string :