Seastar
High performance C++ framework for concurrent servers
|
match_rule check if a url matches criteria, that can contains parameters. the routes object would call the get method with a url and if it matches, the method will return a handler during the matching process, the method fill the parameters object.
#include <seastar/http/matchrules.hh>
Public Member Functions | |
~match_rule () | |
match_rule (handler_base *handler) | |
handler_base * | get (const sstring &url, parameters ¶ms) |
match_rule & | add_matcher (matcher *match) |
match_rule & | add_str (const sstring &str) |
match_rule & | add_param (const sstring &str, bool fullpath=false) |
|
inline |
The destructor deletes matchers.
|
inlineexplicit |
Constructor with a handler
handler | the handler to return when this match rule is met |
|
inline |
Add a matcher to the rule
match | the matcher to add |
|
inline |
add a parameter matcher to the rule
str | the parameter name |
fullpath | when set to true, parameter will included all the remaining url until its end |
|
inline |
Add a static url matcher
str | the string to search for |
|
inline |
Check if url match the rule and return a handler if it does
url | a url to compare against the rule |
params | the parameters object, matches parameters will fill the object during the matching process |