mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
41 lines
637 B
C++
41 lines
637 B
C++
#ifndef HEADER
|
|
# define HEADER
|
|
|
|
#include "webserv.hpp"
|
|
|
|
class Header
|
|
{
|
|
private:
|
|
int _row;
|
|
char *_buff;
|
|
std::string _fileName;
|
|
|
|
std::string _method;
|
|
std::string _version;
|
|
std::string _URI;
|
|
std::map<std::string, std::string> _headerField;
|
|
|
|
|
|
public:
|
|
enum REQ
|
|
{
|
|
GET,
|
|
POST,
|
|
DELETE
|
|
};
|
|
|
|
public:
|
|
std::map<std::string, std::string> getRequest(void);
|
|
std::string getMethod(void);
|
|
std::string getURI(void);
|
|
void setRawData(char *);
|
|
void parseStartLine(std::string);
|
|
void printHeaderInfo(void);
|
|
int parseRequest(void);
|
|
void clear(void);
|
|
Header();
|
|
Header(char *);
|
|
~Header();
|
|
};
|
|
|
|
#endif |