Handlers are components that could be used by components::Server to process the incoming requests.
All the HTTP handlers derive from server::handlers::HttpHandlerBase and override its methods to provide functionality.
See Userver Components for more information on how to register components.
All the handlers inherit configuration options from their base classes:
All the components, including handlers, also have the load-enabled option.
Here's an example of the full config for the server::handlers::Ping handle.
Classes | |
class | server::handlers::HttpHandlerBase |
Base class for all the Userver HTTP Handlers. More... | |
class | server::handlers::Ping |
Handler that returns HTTP 200 if the service is OK and able to process requests. More... | |
class | server::handlers::TestsControl |
Handler that allows to control the behavior of server from tests, and functional tests with testsuite in particular. More... | |
class | server::handlers::HttpHandlerJsonBase |
Convenient base for handlers that accept requests with body in JSON format and respond with body in JSON format. More... | |
class | alerts::Handler |
Handler that returns the list of active fired alerts. More... | |
class | server::handlers::DnsClientControl |
Handlers that controls the DNS client. More... | |
class | server::handlers::DynamicDebugLog |
Handler for forcing specific lines logging. Feature also known as dynamic debug logging. More... | |
class | server::handlers::HttpHandlerFlatbufBase< InputType, ReturnType > |
Convenient base for handlers that accept requests with body in Flatbuffer format and respond with body in Flatbuffer format. More... | |
class | server::handlers::HttpHandlerStatic |
Handler that returns HTTP 200 if file exist and returns file data with mapped content/type. More... | |
class | server::handlers::ImplicitOptions |
A "magical" handler that will respond to OPTIONS HTTP method for any other handler that cannot handle OPTIONS itself. More... | |
class | server::handlers::InspectRequests |
Handler that returns information about all in-flight requests. More... | |
class | server::handlers::Jemalloc |
Handler that controls the jemalloc allocator. More... | |
class | server::handlers::LogLevel |
Handler that controls logging levels of all the loggers. More... | |
class | server::handlers::OnLogRotate |
Handler that controls logging levels of all the loggers. More... | |
class | server::handlers::Restart |
Handler that stops the service. It is expected that an external system (e.g. systemd or supervisord) restarts the service afterwards. More... | |
class | server::handlers::ServerMonitor |
Handler that returns statistics data. More... | |
class | server::websocket::WebsocketHandlerBase |
Base class for WebSocket handler. More... | |