Add makefile and split request and response to header files

This commit is contained in:
Pablu23
2024-07-08 03:07:46 +02:00
parent a32934d4bc
commit 752cb229c3
6 changed files with 200 additions and 165 deletions

19
response.hpp Normal file
View File

@@ -0,0 +1,19 @@
#ifndef RESPONSE_H
#include <map>
#include <string>
#include <vector>
class Response {
private:
std::map<std::string, std::string> m_headers;
std::vector<std::byte> m_payload;
public:
Response(std::vector<std::byte> data);
Response(std::string data);
void SetContentType(const std::string type);
void Send(int clientSocket);
void Print();
};
#endif // !RESPONSE_H