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 "web/http/server/Request.h"
44#include "web/http/StatusCodes.h"
46#ifndef DOXYGEN_SHOULD_SKIP_THIS
53namespace web::http::
server {
60 const std::string&
Request::
get(
const std::string& key,
int i)
const {
61 if (headers.find(key) !=
headers.end()) {
62 std::pair<std::multimap<std::string, std::string>::const_iterator, std::multimap<std::string, std::string>::const_iterator>
63 range =
headers.equal_range(key);
65 if (std::distance(range.first, range.second) >= i) {
66 std::advance(range.first, i);
67 return (*(range.first)).second;
77 const std::map<std::string, std::string>::const_iterator it =
cookies.find(key);
87 const std::map<std::string, std::string>::const_iterator it =
queries.find(key);
static std::string reason(int status)
CiStringMap< std::string > cookies
const std::string & query(const std::string &key) const
CiStringMap< std::string > headers
Request(int status, const std::string &reason="")
const std::string & cookie(const std::string &key) const
CiStringMap< std::string > queries
const std::string & get(const std::string &key, int i=0) const