#include <endpoint.hpp>
Public Member Functions | |
| Route (anch::rest::Method method, std::string pattern, std::vector< std::string > parameterNames) | |
| Route (const Route &)=delete | |
| virtual | ~Route () |
| virtual anch::rest::Response | handle (anch::rest::Request &request, std::vector< std::string > ¶meters)=0 |
| virtual std::size_t | getPathParameterCount () const noexcept=0 |
| virtual std::optional< std::string > | check () const =0 |
| Route & | operator= (const Route &)=delete |
| anch::rest::Method | getMethod () const noexcept |
| const std::string & | getPattern () const noexcept |
| const std::vector< std::string > & | getParameterNames () const noexcept |
Protected Attributes | |
| anch::rest::Method | _method |
| std::string | _pattern |
| std::vector< std::string > | _parameterNames |
| anch::rest::Route::Route | ( | anch::rest::Method | method, |
| std::string | pattern, | ||
| std::vector< std::string > | parameterNames ) |
Route constructor
| method | the method |
| pattern | the path pattern |
| parameterNames | the path parameter names |
|
delete |
|
virtual |
Route destructor
|
pure virtual |
Check endpoint configuration (codecs)
Implemented in anch::rest::Endpoint< F >.
|
noexcept |
|
noexcept |
Path parameter names getter
|
pure virtualnoexcept |
Get the number of path parameters expected by endpoint
Implemented in anch::rest::Endpoint< F >.
|
noexcept |
Path pattern getter
|
pure virtual |
Execute endpoint
| request | the request (path parameters are set) |
| parameters | the decoded path parameters, in pattern order |
| anch::rest::HttpException | on request error (400 , 406 , 415 ) or endpoint error |
Implemented in anch::rest::Endpoint< F >.
|
protected |
|
protected |
Path parameter names, in pattern order
|
protected |
Path pattern