diff options
author | cflip <cflip@cflip.net> | 2022-07-07 09:50:38 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2022-07-07 09:50:38 -0600 |
commit | 76e6c3d690caac3faa664b7b8b79cbc7c6a58394 (patch) | |
tree | 8b0ebbc6fe543a1dc0b9d8eba72efd35f8817aa6 /src/HttpResponse.cpp |
Initial commit
Diffstat (limited to 'src/HttpResponse.cpp')
-rw-r--r-- | src/HttpResponse.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/HttpResponse.cpp b/src/HttpResponse.cpp new file mode 100644 index 0000000..c9c5ff4 --- /dev/null +++ b/src/HttpResponse.cpp @@ -0,0 +1,16 @@ +#include "HttpResponse.h" + +HttpResponse::HttpResponse(ResponseCode response_code) +{ + m_string_stream << "HTTP/1.0 200 OK"; +} + +void HttpResponse::add_header(std::string header) +{ + m_string_stream << '\n' << header; +} + +std::string HttpResponse::to_string() const +{ + return m_string_stream.str(); +} |