0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 19:28:52 +02:00

ircd::http: Allow default constructed sentinel error.

This commit is contained in:
Jason Volk 2018-03-24 16:40:47 -07:00
parent 7dbfb061e9
commit ecce9d0433

View file

@ -90,8 +90,12 @@ struct ircd::http::error
{
std::string content;
std::string headers;
http::code code;
http::code code {http::code(0)};
explicit operator bool() const { return code != http::code(0); }
bool operator!() const { return !bool(*this); }
error() = default;
error(const http::code &, std::string content = {}, std::string headers = {});
error(const http::code &, std::string content, const vector_view<const header> &);
};