-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.cpp
More file actions
36 lines (29 loc) · 1.08 KB
/
request.cpp
File metadata and controls
36 lines (29 loc) · 1.08 KB
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
#include <mochios/messages/request.h>
mochios::messages::Request::Request(const std::string &path) : path(path) {
return;
}
mochios::messages::Request::~Request() { return; }
const void mochios::messages::Request::print() const {
logger::debug("Request:");
logger::debug(" path: " + this->path);
logger::debug(" method: " + this->method);
logger::debug(" headers:");
for (const std::pair<std::string, std::string> &header : this->headers) {
logger::debug(" " + header.first + ": " + header.second);
}
logger::debug(" params:");
for (const std::pair<std::string, std::string> ¶m : this->params) {
logger::debug(" " + param.first + ": " + param.second);
}
logger::debug(" queries:");
for (const std::pair<std::string, std::string> &query : this->queries) {
logger::debug(" " + query.first + ": " + query.second);
}
logger::debug(" cookies:");
for (mochios::messages::Cookie *cookie : this->cookies) {
logger::debug(" " + cookie->serialize());
}
logger::debug(" body:");
logger::debug(" " + this->body.dumps(2, 2));
return;
}