有哪些C ++ HTTP框架可用?

时间:2008-12-15 10:41:10

标签: c++ frameworks

哪些C ++ HTTP框架可用于帮助向应用程序添加HTTP / SOAP服务支持?

4 个答案:

答案 0 :(得分:6)

您还可以查看:

http://pocoproject.org/

答案 1 :(得分:2)

嗯,当然是gSOAP。 :)

http://www.cs.fsu.edu/~engelen/soap.html

答案 2 :(得分:2)

新!回答旧问题: 现在有野兽,提供HTTP和WebSocket: https://github.com/vinniefalco/Beast 这是使用该库的工作程序:

#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;
}

最近更新了文档: http://vinniefalco.github.io/beast/index.html

答案 3 :(得分:1)

Yield高性能服务器框架,支持IIRC SOAP。