开发者

Wrapper for HTTP response encoding

开发者 https://www.devze.com 2023-03-16 04:35 出处:网络
I don\'t want create new wheel and try t开发者_如何学运维o found wrappers for encoding HTTP response for C or C++ (or may be Java implementation).

I don't want create new wheel and try t开发者_如何学运维o found wrappers for encoding HTTP response for C or C++ (or may be Java implementation).

I search something like this :

HttpResponse resp(HttpResponse::Ok_200);
resp.addHeader(someHeaderName, someHeaderValue);
resp.addPart(somePart);
std::string src; // or std::ostream src
resp.write(src);

Do you know something ?


libcurl


I once tried the ClanLib HTTP implementation and it looked a lot like your suggestion. As far as I can remember, I used the CL_HTTPClientConnection and the CL_HTTPServerConnection.

HTH


The POCO libraries include very good HTTP support - see eg http://pocoproject.org/docs/Poco.Net.HTTPResponse.html.

0

精彩评论

暂无评论...
验证码 换一张
取 消