Most common userver HTTP handlers.
Classes | |
class | ClientError |
class | ConflictError |
class | CustomHandlerException |
The generic base class for handler exceptions. Thrown exceptions should typically derive from ExceptionWithCode instead. More... | |
class | DnsClientControl |
Handlers that controls the DNS client. More... | |
class | DynamicDebugLog |
Handler for forcing specific lines logging. Feature also known as dynamic debug logging. More... | |
class | ExceptionWithCode |
Base class for handler exceptions. For common HandlerErrorCode values you can use more specific exception classes below. For less common HandlerErrorCode values, this class can be used directly. More... | |
struct | ExternalBody |
struct | ExtraHeaders |
struct | FormattedErrorData |
class | HandlerBase |
Base class for the request handlers. More... | |
struct | HandlerConfig |
struct | HandlerErrorCodeHash |
Hasher class for HandlerErrorCode. More... | |
class | HttpHandlerBase |
Base class for all the Userver HTTP Handlers. More... | |
class | HttpHandlerFlatbufBase |
Convenient base for handlers that accept requests with body in Flatbuffer format and respond with body in Flatbuffer format. More... | |
class | HttpHandlerJsonBase |
Convenient base for handlers that accept requests with body in JSON format and respond with body in JSON format. More... | |
class | HttpHandlerStatic |
Handler that returns HTTP 200 if file exist and returns file data with mapped content/type. More... | |
class | ImplicitOptions |
A "magical" handler that will respond to OPTIONS HTTP method for any other handler that cannot handle OPTIONS itself. More... | |
class | InspectRequests |
Handler that returns information about all in-flight requests. More... | |
struct | InternalMessage |
class | InternalServerError |
class | Jemalloc |
Handler that controls the jemalloc allocator. More... | |
class | JsonErrorBuilder |
class | LegacyJsonErrorBuilder |
class | LogLevel |
Handler that controls logging levels of all the loggers. More... | |
class | OnLogRotate |
Handler that controls logging levels of all the loggers. More... | |
class | Ping |
Handler that returns HTTP 200 if the service is OK and able to process requests. More... | |
class | RequestParseError |
class | ResourceNotFound |
class | Restart |
Handler that stops the service. It is expected that an external system (e.g. systemd or supervisord) restarts the service afterwards. More... | |
class | ServerMonitor |
Handler that returns statistics data. More... | |
struct | ServiceErrorCode |
class | TestsControl |
Handler that allows to control the behavior of server from tests, and functional tests with testsuite in particular. More... | |
class | Unauthorized |
Typedefs | |
using | Headers = std::unordered_map<std::string, std::string, utils::StrIcaseHash, utils::StrIcaseEqual> |
Enumerations | |
enum class | HandlerErrorCode { kUnknownError , kClientError , kRequestParseError , kUnauthorized , kForbidden , kResourceNotFound , kInvalidUsage , kNotAcceptable , kConflictState , kPayloadTooLarge , kTooManyRequests , kServerSideError , kBadGateway , kGatewayTimeout , kUnsupportedMediaType } |
enum class | FallbackHandler { kImplicitOptions } |
enum class | UrlTrailingSlashOption { kBoth , kStrictMatch , kDefault = kBoth } |
Defines matching behavior for paths with trailing slashes. More... | |
Functions | |
std::string_view | GetCodeDescription (HandlerErrorCode) |
std::string_view | GetFallbackServiceCode (HandlerErrorCode) |
const std::string & | ToString (FallbackHandler) |
FallbackHandler | FallbackHandlerFromString (const std::string &fallback_str) |
HandlerConfig | ParseHandlerConfigsWithDefaults (const yaml_config::YamlConfig &value, const server::ServerConfig &server_config, bool is_monitor=false) |
Variables | |
constexpr size_t | kFallbackHandlerMax = static_cast<size_t>(FallbackHandler::kImplicitOptions) |
using server::handlers::Headers = std::unordered_map<std::string, std::string, utils::StrIcaseHash, utils::StrIcaseEqual> |
Definition at line 76 of file exceptions.hpp.
|
strong |
Definition at line 9 of file fallback_handlers.hpp.
|
strong |
Enumeration that defines protocol-agnostic handler error condition codes, used by server::handlers::CustomHandlerException.
Specific error formats can derive various defaults from the this code, e.g. HTTP status code, JSON service error code, and default error message texts.
For example, to provide an HTTP specific error code that is not presented in this enum the HTTP code should be provided via server::http::CustomHandlerException construction with the required server::http::HttpStatus.
Definition at line 30 of file exceptions.hpp.
|
strong |
Defines matching behavior for paths with trailing slashes.
Enumerator | |
---|---|
kBoth | ignore trailing slashes when matching paths |
kStrictMatch | require exact match for trailing slashes in paths |
Definition at line 22 of file handler_config.hpp.
|
constexpr |
Definition at line 13 of file fallback_handlers.hpp.