![]() |
RMVL
2.3.0
Robotic Manipulation and Vision Library
|
路由模式匹配器 更多...
#include <rmvl/io/netapp.hpp>
Public 成员函数 | |
| RoutePattern (std::string_view pattern_str) | |
| 构造路由模式 | |
| bool | match (std::string_view path, std::unordered_map< std::string, std::string > ¶ms) const |
| 匹配路径,并提取参数 | |
路由模式匹配器
|
explicit |
构造路由模式
| [in] | pattern_str | 路由模式字符串,如 "/api/:name" |
| bool rm::async::Webapp::RoutePattern::match | ( | std::string_view | path, |
| std::unordered_map< std::string, std::string > & | params ) const |
匹配路径,并提取参数
| [in] | path | 请求路径 |
| [out] | params | 输出参数,提取的路径参数 |