blob: 8a1d2d48fc025cccc63f05e05e446ab158085e25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
#include <map>
#include <string>
enum class HttpStatusCode {
OK = 200
};
class HttpResponse {
public:
HttpResponse(HttpStatusCode status_code);
void add_header(const std::string& header, const std::string& value);
void set_content(const std::string& content) { m_content = content; }
std::string to_string() const;
private:
HttpStatusCode m_status_code;
std::map<std::string, std::string> m_headers;
std::string m_content;
};
|