|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Structured HTTP error information. More...
#include <http_error.h>

Public Member Functions | |
| auto | status_code () const -> int |
| Get status code as integer. | |
| auto | is_client_error () const -> bool |
| Check if this is a client error (4xx) | |
| auto | is_server_error () const -> bool |
| Check if this is a server error (5xx) | |
Public Attributes | |
| http_error_code | code = http_error_code::internal_server_error |
| std::string | message |
| std::string | detail |
| std::string | request_id |
| std::chrono::system_clock::time_point | timestamp = std::chrono::system_clock::now() |
Structured HTTP error information.
Definition at line 77 of file http_error.h.
|
inline |
Check if this is a client error (4xx)
Definition at line 95 of file http_error.h.
References status_code().

|
inline |
Check if this is a server error (5xx)
Definition at line 105 of file http_error.h.
References status_code().

|
inline |
Get status code as integer.
Definition at line 89 of file http_error.h.
References code.
Referenced by is_client_error(), and is_server_error().

| http_error_code kcenon::network::internal::http_error::code = http_error_code::internal_server_error |
Definition at line 79 of file http_error.h.
Referenced by kcenon::network::internal::http_error_response::make_error(), status_code(), and kcenon::network::internal::parse_error::to_http_error().
| std::string kcenon::network::internal::http_error::detail |
Definition at line 81 of file http_error.h.
Referenced by kcenon::network::internal::parse_error::to_http_error().
| std::string kcenon::network::internal::http_error::message |
Definition at line 80 of file http_error.h.
Referenced by kcenon::network::internal::parse_error::to_http_error().
| std::string kcenon::network::internal::http_error::request_id |
Definition at line 82 of file http_error.h.
| std::chrono::system_clock::time_point kcenon::network::internal::http_error::timestamp = std::chrono::system_clock::now() |
Definition at line 83 of file http_error.h.