First really working router Version
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#ifndef REQUEST_HEADER_H
|
||||
#define REQUEST_HEADER_H
|
||||
|
||||
#include "path.hpp"
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@@ -9,7 +11,7 @@ class Request {
|
||||
private:
|
||||
std::map<std::string, std::string> m_headers;
|
||||
std::string m_method;
|
||||
std::string m_path;
|
||||
std::string m_pathRaw;
|
||||
std::vector<std::byte> m_payload;
|
||||
std::string m_protocol;
|
||||
|
||||
@@ -17,7 +19,8 @@ private:
|
||||
bool protocol(std::stringstream *ss, int *procPart, char c);
|
||||
|
||||
public:
|
||||
Request(std::vector<std::byte> buf);
|
||||
Path path;
|
||||
explicit Request(std::vector<std::byte> buf);
|
||||
void Print();
|
||||
bool HasData();
|
||||
std::vector<std::byte> Data();
|
||||
|
||||
Reference in New Issue
Block a user