Seastar
High performance C++ framework for concurrent servers
Public Member Functions | Public Attributes | Protected Attributes | List of all members
seastar::httpd::api_registry Class Reference
Inheritance diagram for seastar::httpd::api_registry:
seastar::httpd::api_registry_base seastar::httpd::handler_base

Public Member Functions

 api_registry (routes &routes, const sstring &file_directory, const sstring &base_path)
 
future< std::unique_ptr< http::reply > > handle (const sstring &path, std::unique_ptr< http::request > req, std::unique_ptr< http::reply > rep) override
 
void reg (const sstring &api, const sstring &description, const sstring &alternative_path="")
 
void set_route (handler_base *h)
 
handler_basemandatory (const sstring &param)
 

Public Attributes

std::vector< sstring > _mandatory_param
 

Protected Attributes

sstring _base_path
 
sstring _file_directory
 
routes_routes
 

Member Function Documentation

◆ handle()

future<std::unique_ptr<http::reply> > seastar::httpd::api_registry::handle ( const sstring &  path,
std::unique_ptr< http::request req,
std::unique_ptr< http::reply rep 
)
inlineoverridevirtual

All handlers should implement this method. It fill the reply according to the request.

Parameters
paththe url path used in this call
reqthe original request
repthe reply

Implements seastar::httpd::handler_base.

◆ mandatory()

handler_base& seastar::httpd::handler_base::mandatory ( const sstring &  param)
inlineinherited

Add a mandatory parameter

Parameters
parama parameter name
Returns
a reference to the handler

The documentation for this class was generated from the following file: