-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponse.cpp
More file actions
35 lines (27 loc) · 1.09 KB
/
response.cpp
File metadata and controls
35 lines (27 loc) · 1.09 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
#include <mochios/messages/response.h>
mochios::messages::Response::Response() { return; }
mochios::messages::Response::~Response() { return; }
const void mochios::messages::Response::print() const {
logger::debug("Response:");
logger::debug(" statusCode: " + std::to_string(this->statusCode));
logger::debug(" statusText: " + this->statusText);
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;
}