views:

100

answers:

2
+4  Q: 

http c++ library?

Hi i am wondreing if there is some kind of c++ library that deals with http, http chunking etc. Google did not find anything :D

+7  A: 

Maybe libCURL?

5ound
+2  A: 

I'm also using libCURL in my projects. It has bindings with many programming languages (http://curl.haxx.se/libcurl/bindings.html) but using it without them is also very easy. Simplest example:

#include <stdio.h>
#include <curl/curl.h>

int main(void)
{
  CURL *curl;
  CURLcode res;

  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
    res = curl_easy_perform(curl);

    /* always cleanup */ 
    curl_easy_cleanup(curl);
  }
  return 0;
}

This example and many more can be found here.

virious
since this is a C++ question, a C++ example using the C++ bindings would be more appropriate http://curlpp.org/index.php/examples
smerlin