Seastar
High performance C++ framework for concurrent servers
|
handlers holds the logic for serving an incoming request. All handlers inherit from the base httpserver_handler and implement the handle method.
#include <seastar/http/handlers.hh>
Public Member Functions | |
virtual future< std::unique_ptr< http::reply > > | handle (const sstring &path, std::unique_ptr< http::request > req, std::unique_ptr< http::reply > rep)=0 |
handler_base & | mandatory (const sstring ¶m) |
Public Attributes | |
std::vector< sstring > | _mandatory_param |
Protected Member Functions | |
handler_base (const handler_base &)=default | |
|
pure virtual |
All handlers should implement this method. It fill the reply according to the request.
path | the url path used in this call |
req | the original request |
rep | the reply |
Implemented in seastar::httpd::function_handler, seastar::httpd::file_handler, seastar::httpd::directory_handler, seastar::httpd::api_registry_20, and seastar::httpd::api_registry.
|
inline |
Add a mandatory parameter
param | a parameter name |