aboutsummaryrefslogtreecommitdiff
path: root/src/http_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/http_server.h')
-rw-r--r--src/http_server.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http_server.h b/src/http_server.h
index 0c4dafe..6175295 100644
--- a/src/http_server.h
+++ b/src/http_server.h
@@ -25,12 +25,12 @@ class HTTPRequest {
HTTPRequest(SOCKET socket);
~HTTPRequest();
+ std::string get_body() { return this->body; }
+
void parse_headers(std::string raw);
void set_body(std::string body) { this->body = body; }
size_t content_length();
- std::string get_body() { return this->body; }
-
void respond(std::string status_code, header_map response_headers, std::string response_body);
void close();
};
@@ -45,6 +45,8 @@ class HTTPServer {
HTTPServer(unsigned long addr, unsigned short port);
~HTTPServer();
+ SOCKET get_socket() { return this->sock; }
+
void close();
HTTPRequest* receive_request();
};