2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef EXPRESS_REQUEST_H
43#define EXPRESS_REQUEST_H
45#include "utils/AttributeInjector.h"
47namespace web::http::server {
51#ifndef DOXYGEN_SHOULD_SKIP_THIS
53#include "web/http/CiStringMap.h"
63 class Request :
public utils::MultibleAttributeInjector {
66 explicit Request(
const std::shared_ptr<web::http::server::Request>& request)
noexcept;
68 explicit Request(Request&) =
delete;
69 explicit Request(Request&&)
noexcept =
delete;
71 Request& operator=(Request&) =
delete;
72 Request& operator=(Request&&)
noexcept =
delete;
74 const std::string& param(
const std::string& id,
const std::string& fallBack =
"");
76 std::string originalUrl;
79 std::map<std::string, std::string> params;
84 std::shared_ptr<web::http::server::Request> requestBase;
86 friend class Response;
90 const std::string& get(
const std::string& key,
int i = 0)
const;
91 const std::string& cookie(
const std::string& key)
const;
92 const std::string& query(
const std::string& key)
const;
97 std::string httpVersion;
101 web::http::CiStringMap<std::string> queries;
102 web::http::CiStringMap<std::string> headers;
103 web::http::CiStringMap<std::string> cookies;
104 std::vector<
char> body;
#define DECLARE_ROUTER_REQUESTMETHOD(METHOD)
static express::Router getRouter()
static WebApp getWebApp(const std::string &name)
static WebApp getWebApp(const std::string &name)
int main(int argc, char *argv[])