What C++ Library Should I Use to Implement a Http Client? [Closed]
I'm Looking for a C++ Library That Implements or Enables the Implementation of a Http Client. It Should Handle Cookies as Well. What Would You Propose? 4 8...
I'm looking for a C++ library that implements or enables the implementation of a HTTP client. It should handle cookies as well.
What would you propose?
Curl++: is an option, particularly if you want things in more of a C++ style.
cpp-netlib: very good and simple to use, available on ubuntu
sudo apt-get install libcppnetlib-dev
example:
using namespace boost::network;
using namespace boost::network::http;
client::request request_("");
request_ << header("Connection", "close");
client client_;
client::response response_ = client_.get(request_);
std::string body_ = body(response_);
Take a look at Poco Libraries.
I started using them as they are portable and it's a joy to work with. Simple and clean - though I haven't dived in anything fancy for the moment.
If it's for windows, take a look at Windows HTTP Services (WinHTTP)
Microsoft Windows HTTP Services (WinHTTP) provides developers with an HTTP client application programming interface (API) to send requests through the HTTP protocol to other HTTP servers.
WinHTTP offers both a C/C++ application programming interface (API) and a Component Object Model (COM) automation component suitable for use in Active Server Pages (ASP) based applications.
For Cookies (VS.85).aspx
All alternative library are available here, if you need complex http APIs, try curl, if just wanna get a file, try http-tiny
On Windows you can drive IE using IWebBrowser2 interface.