static func getReasonPhrase()

This commit is contained in:
Talyx
2022-01-29 14:16:41 +03:00
parent 880af6cd6a
commit 087b16546e
2 changed files with 6 additions and 4 deletions

View File

@@ -94,6 +94,8 @@ void Response::methodGet(void)
//-------------------------------------------------GET/SET--------------------------------------- //-------------------------------------------------GET/SET---------------------------------------
std::map<std::string, std::string> Response::_errorCode;
void Response::initErrorCode(void) void Response::initErrorCode(void)
{ {
_errorCode["100"] = "Continue"; _errorCode["100"] = "Continue";

View File

@@ -14,7 +14,7 @@ private:
ServerConfig *_config; ServerConfig *_config;
private: private:
std::map<std::string, std::string> _errorCode; static std::map<std::string, std::string> _errorCode;
private: private:
void methodGet(void); void methodGet(void);
@@ -25,15 +25,15 @@ private:
public: public:
std::string getClient(void); std::string getClient(void);
std::string getBody(void); std::string getBody(void);
std::string getReasonPhrase(std::string); static std::string getReasonPhrase(std::string);
std::string getReasonPhrase(int); static std::string getReasonPhrase(int);
std::string getErrorPage(int code); std::string getErrorPage(int code);
void setData(Request, ServerConfig *); void setData(Request, ServerConfig *);
public: public:
void OpenResponseFile(const char *path); void OpenResponseFile(const char *path);
void initErrorCode(void); void initErrorCode(void);
void generate(); void generate();
Response(); Response();
~Response(); ~Response();