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:
parent
7dbfb061e9
commit
ecce9d0433
1 changed files with 5 additions and 1 deletions
|
@ -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> &);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue