#include <endpoint.hpp>
Public Member Functions | |
| EndPoint () | |
| EndPoint (const EndPoint &other) | |
| EndPoint (EndPoint &&other) | |
| virtual | ~EndPoint () |
| bool | match (const anch::rest::Request &request) const |
| void | build () |
| const std::string & | getPathPattern () const |
| void | setPathPattern (const std::string &pathPattern) |
| const std::regex & | getPathRegex () const |
Public Attributes | |
| std::string | verb |
| std::string | pathPattern |
| std::string | contentType |
| std::string | accept |
| anch::rest::EndPoint::EndPoint | ( | ) |
EndPoint default constructor
| anch::rest::EndPoint::EndPoint | ( | const EndPoint & | other | ) |
| anch::rest::EndPoint::EndPoint | ( | EndPoint && | other | ) |
|
virtual |
EndPoint destructor
| void anch::rest::EndPoint::build | ( | ) |
Finalize EndPoint construction.
This will compute number of separator in path and path regular expression.
| const std::string & anch::rest::EndPoint::getPathPattern | ( | ) | const |
Path pattern getter
| const std::regex & anch::rest::EndPoint::getPathRegex | ( | ) | const |
Number of '/' getter in path
| bool anch::rest::EndPoint::match | ( | const anch::rest::Request & | request | ) | const |
Check if Request match this endpoint
| request | the request to check |
true if request matches, false otherwise | void anch::rest::EndPoint::setPathPattern | ( | const std::string & | pathPattern | ) |
Path pattern setter
| pathPattern | the path pattern to set |
| std::string anch::rest::EndPoint::accept |
Request media type
| std::string anch::rest::EndPoint::contentType |
Reponse media type
| std::string anch::rest::EndPoint::pathPattern |
Path pattern
| std::string anch::rest::EndPoint::verb |
HTTP verb