1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// cs/net/http/response.cc
#include "cs/net/http/response.hh"
#include <stdint.h>
#include <map>
#include <ostream>
#include <sstream>
#include <string>
namespace cs::net::http {
Response HtmlResponse(std::string body) {
return Response(HTTP_200_OK, kContentTypeTextHtml, body);
}
Response HtmlResponse(std::stringstream ss) {
return Response(HTTP_200_OK, kContentTypeTextHtml,
ss.str());
}
} // namespace cs::net::http