Struct http_error¶
Defined in File page.h
Struct Documentation¶
-
struct
udho::exceptions::http_error: public exception¶ throw HTTP error exception in order to send a HTTP response other than 200 OK. Uncaught exceptions are presented as html page with routing sumary
http_error(boost::beast::http::status::notfound)
Public Types
-
typedef boost::beast::http::header<false>
headers_type¶
Public Functions
-
http_error(boost::beast::http::status status, const std::string &message = "")¶
-
void
add_header(boost::beast::http::field key, const std::string &value)¶
-
void
redirect(const std::string &url)¶
-
template<typename
T>
boost::beast::http::response<boost::beast::http::string_body>response(const boost::beast::http::request<T> &request) const¶
-
template<typename
AuxT, typenameU, typenameV>
boost::beast::http::response<boost::beast::http::string_body>response(const udho::context<AuxT, U, V> &ctx) const¶
-
template<typename
T, typenameRouterT>
boost::beast::http::response<boost::beast::http::string_body>response(const boost::beast::http::request<T> &request, RouterT &router) const¶
-
template<typename
AuxT, typenameU, typenameV, typenameRouterT>
boost::beast::http::response<boost::beast::http::string_body>response(const udho::context<AuxT, U, V> &ctx, RouterT &router) const¶
-
std::string
page(const std::string &target, std::string content = "") const¶
-
const char *
what() const noexcept¶
-
boost::beast::http::status
result() const¶
-
typedef boost::beast::http::header<false>