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#include "express/Request.h"
44#include "web/http/server/Request.h"
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
48#include "web/http/http_utils.h"
71 const std::string&
Request::
param(
const std::string& id,
const std::string& fallBack) {
79 if (
url.length() <= 2 || !
url.ends_with(
"/")) {
85 }
else if (
url.ends_with(
"/")) {
93 const std::string&
Request::
get(
const std::string& key,
int i)
const {
98 const std::map<std::string, std::string>::const_iterator it =
cookies.find(key);
108 const std::map<std::string, std::string>::const_iterator it =
queries.find(key);
web::http::CiStringMap< std::string > cookies
const std::string & cookie(const std::string &key) const
std::map< std::string, std::string > params
const std::string & get(const std::string &key, int i=0) const
web::http::CiStringMap< std::string > queries
Request(const std::shared_ptr< web::http::server::Request > &request) noexcept
std::shared_ptr< web::http::server::Request > requestBase
const std::string & query(const std::string &key) const
web::http::CiStringMap< std::string > headers
const std::string & param(const std::string &id, const std::string &fallBack="")
CiStringMap< std::string > cookies
CiStringMap< std::string > headers
CiStringMap< std::string > queries
const std::string & get(const std::string &key, int i=0) const
std::pair< std::string, std::string > str_split_last(const std::string &base, char c_middle)
std::string url_decode(const std::string &text)