wip, need somes changes in ConfigParser.
+ _determine_location() + http_method changes + http_method switch in _construct_response() + ConfigParser::_str_to_method_type() moved to global utils.cpp
This commit is contained in:
@@ -9,24 +9,28 @@
|
||||
|
||||
// enum http_method
|
||||
// {
|
||||
// GET = 0b000001,
|
||||
// POST = 0b000010,
|
||||
// DELETE = 0b000100,
|
||||
// INVALID = 0b001000,
|
||||
// UNKNOWN = 0b00000000,
|
||||
// GET = 0b00000001,
|
||||
// POST = 0b00000010,
|
||||
// DELETE = 0b00000100,
|
||||
// ALL_METHODS = 0b11111111,
|
||||
// };
|
||||
|
||||
enum http_method
|
||||
{
|
||||
GET = 1,
|
||||
UNKNOWN = 0b0,
|
||||
GET = 1 << 0,
|
||||
POST = 1 << 1,
|
||||
DELETE = 1 << 2,
|
||||
INVALID = 1 << 3,
|
||||
ALL_METHODS = 0b11111111,
|
||||
};
|
||||
|
||||
std::vector<std::string> split(std::string input, char delimiter);
|
||||
bool isNumeric(std::string str);
|
||||
bool isNumeric_btw(int low, int high, std::string str);
|
||||
std::vector<std::string> split(std::string input, char delimiter);
|
||||
bool isNumeric(std::string str);
|
||||
bool isNumeric_btw(int low, int high, std::string str);
|
||||
std::string itos(int n);
|
||||
std::string trim(std::string str, char c);
|
||||
http_method str_to_http_method(std::string &str);
|
||||
std::string http_methods_to_str(unsigned int methods);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user