-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResponseConfig.hpp
More file actions
36 lines (32 loc) · 908 Bytes
/
ResponseConfig.hpp
File metadata and controls
36 lines (32 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef HTTP_CONFIG_HPP
# define HTTP_CONFIG_HPP
#include <map>
#include <string>
#include <algorithm>
#include <set>
#include <iomanip>
#include <sstream>
#include <iostream>
#include <ctime>
#include <cstdio>
class ServerConfiguration;
class Event;
class ResponseConfig
{
private:
void setHttpStatusCode(void);
void setHttpContentType(void);
static std::map<std::string, std::string> statusCodeRepo;
static std::set<std::string> supportedTypesRepo;
static std::map<std::string, std::string> cgiAddressRepo;
std::string date;
public:
ResponseConfig();
~ResponseConfig();
ResponseConfig(std::map<int, ServerConfiguration*> &serverConfigs, Event *event);
static void putHttpStatusCode(std::string key, std::string value);
static std::string getCurrentDate();
static std::string getContentType(std::string filename);
static std::string getHttpStatusMsg(std::string key);
};
#endif