What C++ HTTP frameworks are available that will help in adding HTTP/SOAP serving support to an application?
Asked
Active
Viewed 1,448 times
4 Answers
6
You could also look at:

ColinH
- 69
- 2
-
This is also nice piece of software. too bad i can't select more answers as accepted. upvoted though. thank you – daniels Dec 15 '08 at 12:46
2
NEW! Answer to an old question: Now there's Beast, which offers both HTTP and WebSocket: https://github.com/vinniefalco/Beast Here's a working program using the library:
#include <beast/http.hpp>
#include <boost/asio.hpp>
#include <iostream>
#include <string>
int main()
{
// Normal boost::asio setup
std::string const host = "boost.org";
boost::asio::io_service ios;
boost::asio::ip::tcp::resolver r(ios);
boost::asio::ip::tcp::socket sock(ios);
boost::asio::connect(sock,
r.resolve(boost::asio::ip::tcp::resolver::query{host, "http"}));
using namespace beast::http;
// Send HTTP request using beast
request<empty_body> req({method_t::http_get, "/", 11});
req.headers.replace("Host", host + ":" + std::to_string(sock.remote_endpoint().port()));
req.headers.replace("User-Agent", "Beast");
write(sock, req);
// Receive and print HTTP response using beast
beast::streambuf sb;
response<streambuf_body> resp;
read(sock, sb, resp);
std::cout << resp;
}
The documentation was recently updated too: http://vinniefalco.github.io/beast/index.html

Vinnie Falco
- 5,173
- 28
- 43