diff options
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(); +} |