Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
dcn::RouteKey Class Reference

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::URLgetPath () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RouteKey()

dcn::RouteKey::RouteKey ( http::Method  method,
http::URL  path 
)

Member Function Documentation

◆ getMethod()

http::Method dcn::RouteKey::getMethod ( ) const

Get the HTTP method of the route key.

Returns
The HTTP method.

◆ getPath()

const http::URL & dcn::RouteKey::getPath ( ) const

Get the URL of the route key.

Returns
The URL.

◆ getPathInfoDef()

const std::vector< std::variant< std::string, RouteArgDef > > & dcn::RouteKey::getPathInfoDef ( ) const

Get the path info segments of the route key.

Returns
The path info segments.

◆ getQueryDef()

const absl::flat_hash_map< std::string, std::variant< std::string, RouteArgDef > > & dcn::RouteKey::getQueryDef ( ) const

◆ operator==()

bool dcn::RouteKey::operator== ( const RouteKey other) const

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