FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expresscpp/include/expresscpp/route.hpp at master · hpsware/expresscpp · GitHub
hpsware
/
expresscpp
Public
forked from
expresscpp/expresscpp
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
expresscpp
/
include
/
expresscpp
/
route.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (31 loc) · 870 Bytes
Breadcrumbs
expresscpp
/
include
/
expresscpp
/
route.hpp
Copy path
File metadata and controls
46 lines (31 loc) · 870 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
pragma
once
#
include
<
set
>
#
include
<
string
>
#
include
<
string_view
>
#
include
"
boost/uuid/uuid.hpp
"
#
include
"
expresscpp/http_method.hpp
"
#
include
"
expresscpp/types.hpp
"
#
include
"
expresscpp/exports.hpp
"
namespace
expresscpp
{
class
Layer
;
class
EXPRESSCPP_API
Route {
public:
//
! @brief Initialize `Route` with the given `path`
Route
(std::string_view path);
Route
(std::string_view path, HttpMethod method);
~Route
();
void
Dispatch
(
request_t
req,
response_t
res,
next_t
next);
std::string_view
GetPath
()
const
;
void
SetPath
(
const
std::string_view& path);
/*
*
* Determine if the route handles a given method.
*/
bool
HasMethod
(HttpMethod method);
std::set<HttpMethod> methods_;
std::vector<std::shared_ptr<Layer>> stack_;
private:
void
Init
();
boost::uuids::uuid uuid_;
std::string path_;
};
}
//
namespace expresscpp
Back
|
FazBrowse Home
|
New Git URL