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#ifndef DOXYGEN_SHOULD_SKIP_THIS
51namespace web::http::
server {
53 const std::string&
Request::
get(
const std::string& key,
int i)
const {
54 if (headers.find(key) !=
headers.end()) {
55 std::pair<std::multimap<std::string, std::string>::const_iterator, std::multimap<std::string, std::string>::const_iterator>
56 range =
headers.equal_range(key);
58 if (std::distance(range.first, range.second) >= i) {
59 std::advance(range.first, i);
60 return (*(range.first)).second;
70 const std::map<std::string, std::string>::const_iterator it =
cookies.find(key);
80 const std::map<std::string, std::string>::const_iterator it =
queries.find(key);
CiStringMap< std::string > cookies
const std::string & query(const std::string &key) const
CiStringMap< std::string > headers
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