#include <userver/easy.hpp>
easy::HttpWith like class with erased dependencies information that should be used only in dependency registration functions; use easy::HttpWith if not making a new dependency class.
Classes | |
| struct | Callback |
Public Member Functions | |
| void | DefaultContentType (http::ContentType content_type) |
| Sets the default Content-Type header for all the routes. | |
| void | Route (std::string_view path, Callback &&func, std::initializer_list< server::http::HttpMethod > methods) |
| Register an HTTP handler by path that supports the methods HTTP methods. | |
| template<class Component> | |
| bool | TryAddComponent (std::string_view name, std::string_view config) |
| Append a component to the component list of a service. | |
| template<class Component> | |
| bool | TryAddComponent (std::string_view name) |
| void | DbSchema (std::string_view schema) |
| Stores the schema for further retrieval from GetDbSchema(). | |
| void | Port (std::uint16_t port) |
| Set the HTTP server listen port, default is 8080. | |
| void | LogLevel (logging::Level level) |
| Set the logging level for the service. | |
Static Public Member Functions | |
| static const std::string & | GetDbSchema () noexcept |
| void easy::HttpBase::DbSchema | ( | std::string_view | schema | ) |
Stores the schema for further retrieval from GetDbSchema().
| void easy::HttpBase::DefaultContentType | ( | http::ContentType | content_type | ) |
|
staticnoexcept |
| void easy::HttpBase::LogLevel | ( | logging::Level | level | ) |
| void easy::HttpBase::Port | ( | std::uint16_t | port | ) |
| void easy::HttpBase::Route | ( | std::string_view | path, |
| Callback && | func, | ||
| std::initializer_list< server::http::HttpMethod > | methods ) |
|
inline |
|
inline |
Append a component to the component list of a service.