Seastar
High performance C++ framework for concurrent servers
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | List of all members
seastar::httpd::str_matcher Class Reference

Detailed Description

Check if the url match a predefine string.

When parsing a match rule such as '/file/{path}' the str_match would parse the '/file' part

#include <seastar/http/matcher.hh>

Inheritance diagram for seastar::httpd::str_matcher:
seastar::httpd::matcher

Public Member Functions

 str_matcher (const sstring &cmp)
 
virtual size_t match (const sstring &url, size_t ind, parameters &param) override
 

Constructor & Destructor Documentation

◆ str_matcher()

seastar::httpd::str_matcher::str_matcher ( const sstring &  cmp)
inlineexplicit

Constructor

Parameters
cmpthe string to match

Member Function Documentation

◆ match()

virtual size_t seastar::httpd::str_matcher::match ( const sstring &  url,
size_t  ind,
parameters param 
)
overridevirtual

check if the given url matches the rule

Parameters
urlthe url to check
indthe position to start from
paramfill the parameters hash
Returns
the end of of the matched part, or sstring::npos if not matched

Implements seastar::httpd::matcher.


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