+ Client get return reference + wip binary flags for http_method + moved config parser files
33 lines
627 B
C++
33 lines
627 B
C++
|
|
#ifndef UTILS_HPP
|
|
# define UTILS_HPP
|
|
|
|
# include <vector>
|
|
# include <string>
|
|
# include <sstream>
|
|
# include <cstdlib> // atoi
|
|
|
|
// enum http_method
|
|
// {
|
|
// GET = 0b000001,
|
|
// POST = 0b000010,
|
|
// DELETE = 0b000100,
|
|
// INVALID = 0b001000,
|
|
// };
|
|
|
|
enum http_method
|
|
{
|
|
GET = 1,
|
|
POST = 1 << 1,
|
|
DELETE = 1 << 2,
|
|
INVALID = 1 << 3,
|
|
};
|
|
|
|
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);
|
|
|
|
#endif
|