|
Captures parameters in request path and stores them in Request::path_params. More...
#include <RobotAPI/libraries/armem/server/ltm/detail/mixins/util/httplib.h>
Public Member Functions | |
bool | match (Request &request) const override |
PathParamsMatcher (const std::string &pattern) | |
![]() | |
virtual | ~MatcherBase ()=default |
Captures parameters in request path and stores them in Request::path_params.
Capture name is a substring of a pattern from : to /. The rest of the pattern is matched agains the request path directly Parameters are captured starting from the next character after the end of the last matched static pattern fragment until the next /.
Example pattern: "/path/fragments/:capture/more/fragments/:second_capture" Static fragments: "/path/fragments/", "more/fragments/"
Given the following request path: "/path/fragments/:1/more/fragments/:2" the resulting capture will be {{"capture", "1"}, {"second_capture", "2"}}
|
inline |
|
inlineoverridevirtual |
Implements MatcherBase.