A class representing a route key, which is a combination of a HTTP method and a URL. More...
#include <route_key.hpp>
Public Member Functions | |
RouteKey (http::Method method, http::URL path) | |
bool | operator== (const RouteKey &other) const |
http::Method | getMethod () const |
Get the HTTP method of the route key. | |
const http::URL & | getPath () const |
Get the URL of the route key. | |
const std::vector< std::variant< std::string, RouteArgDef > > & | getPathInfoDef () const |
Get the path info segments of the route key. | |
const absl::flat_hash_map< std::string, std::variant< std::string, RouteArgDef > > & | getQueryDef () const |
A class representing a route key, which is a combination of a HTTP method and a URL.
This class is used to identify a specific route in the server's routing table.
dcn::RouteKey::RouteKey | ( | http::Method | method, |
http::URL | path | ||
) |
http::Method dcn::RouteKey::getMethod | ( | ) | const |
Get the HTTP method of the route key.
const std::vector< std::variant< std::string, RouteArgDef > > & dcn::RouteKey::getPathInfoDef | ( | ) | const |
Get the path info segments of the route key.
const absl::flat_hash_map< std::string, std::variant< std::string, RouteArgDef > > & dcn::RouteKey::getQueryDef | ( | ) | const |