Go to the documentation of this file. 1 #ifndef CPP_WEB_SERVER_HTTP_REPLY_HPP
2 #define CPP_WEB_SERVER_HTTP_REPLY_HPP
8 #include <boost/asio.hpp>
9 #include <boost/filesystem.hpp>
45 static std::vector<boost::asio::const_buffer>
46 to_buffers(
const std::vector<HttpHeader>& headers);
58 const std::string& filename,
59 const std::vector<HttpHeader>& additional_headers =
60 std::vector<HttpHeader>());
71 const std::string& filesystem_root,
bool list_directories,
72 const std::vector<HttpHeader>& additional_headers =
73 std::vector<HttpHeader>());
80 const std::string& content,
81 const std::vector<HttpHeader>& additional_headers =
82 std::vector<HttpHeader>());
120 boost::shared_ptr<std::vector<HttpHeader>>
headers_;
130 const std::vector<HttpHeader>& headers,
131 const std::string& content);
134 const char* begin,
const char* end);
148 const std::string& filename,
149 const std::vector<HttpHeader>& headers);
152 const char* begin,
const char* end);
167 const std::string& path_root,
168 const std::string& filesystem_root,
169 bool list_directories,
170 const std::vector<HttpHeader>& headers);
173 const char* begin,
const char* end);
FilesystemHttpRequestHandler(HttpReply::status_type status, const std::string &path_root, const std::string &filesystem_root, bool list_directories, const std::vector< HttpHeader > &headers)
HttpReply::status_type status_
FileHttpRequestHandler(HttpReply::status_type status, const std::string &filename, const std::vector< HttpHeader > &headers)
ReplyBuilder & header(const std::string &name, const std::string &value)
std::vector< HttpHeader > headers_
HttpReply::status_type status_
boost::function< bool(const HttpRequest &, boost::shared_ptr< HttpConnection >, const char *begin, const char *end)> HttpServerRequestHandler
ReplyBuilder(HttpReply::status_type status)
bool operator()(const HttpRequest &, boost::shared_ptr< HttpConnection >, const char *begin, const char *end)
const std::string content_string_
bool operator()(const HttpRequest &, boost::shared_ptr< HttpConnection >, const char *begin, const char *end)
HttpReply::status_type status_
std::vector< HttpHeader > headers_
static HttpServerRequestHandler stock_reply(status_type status)
boost::filesystem::path filesystem_root_
bool operator()(const HttpRequest &, boost::shared_ptr< HttpConnection >, const char *begin, const char *end)
static HttpServerRequestHandler from_file(HttpReply::status_type status, const std::string &content_type, const std::string &filename, const std::vector< HttpHeader > &additional_headers=std::vector< HttpHeader >())
boost::shared_ptr< HttpConnection > HttpConnectionPtr
boost::shared_ptr< std::vector< HttpHeader > > headers_
static ReplyBuilder builder(status_type status)
void write(HttpConnectionPtr connection)
ReplyBuilder & headers(const std::vector< HttpHeader > &headers)
enum async_web_server_cpp::HttpReply::status_type status
static HttpServerRequestHandler static_reply(status_type status, const std::string &content_type, const std::string &content, const std::vector< HttpHeader > &additional_headers=std::vector< HttpHeader >())
static std::vector< boost::asio::const_buffer > to_buffers(const std::vector< HttpHeader > &headers)
static HttpServerRequestHandler from_filesystem(HttpReply::status_type status, const std::string &path_root, const std::string &filesystem_root, bool list_directories, const std::vector< HttpHeader > &additional_headers=std::vector< HttpHeader >())
StaticHttpRequestHandler(HttpReply::status_type status, const std::vector< HttpHeader > &headers, const std::string &content)
ReplyBuilder reply_builder_
async_web_server_cpp
Author(s): Mitchell Wills
, Russel Toris
autogenerated on Tue Mar 1 2022 23:49:06