diff options
author | cflip <cflip@cflip.net> | 2023-05-08 21:25:21 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-05-08 21:25:21 -0600 |
commit | 7f1d6bbc335288df1e24e7c8f305c32afe6b050a (patch) | |
tree | 3ca1784ab73315e44dd9e03b2f0e244a59158fbc /src/HttpResponse.h | |
parent | 83fb0b96c94e7f596f81d5bc346150904457ed64 (diff) |
Begin rewriting cfws in C
Diffstat (limited to 'src/HttpResponse.h')
-rw-r--r-- | src/HttpResponse.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/HttpResponse.h b/src/HttpResponse.h deleted file mode 100644 index b55e01a..0000000 --- a/src/HttpResponse.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include <map> -#include <string> - -enum class HttpStatusCode { - OK = 200, - Forbidden = 403, - NotFound = 404, - InternalServerError = 500, -}; - -class HttpResponse { -public: - void add_header(const std::string& header, const std::string& value) - { - m_headers[header] = value; - } - - void set_status_code(HttpStatusCode status_code) { m_status_code = status_code; } - void set_content(const std::string& content) { m_content = content; } - void add_headers_and_content(const std::string&); - - std::string to_string() const; - -private: - HttpStatusCode m_status_code; - std::map<std::string, std::string> m_headers; - std::string m_content; -}; |