+ MethodType renamed to http_method, and moved to utils.hpp + operator= overload for Client moved to Client.cpp
25 lines
475 B
C++
25 lines
475 B
C++
|
|
#ifndef UTILS_HPP
|
|
# define UTILS_HPP
|
|
|
|
# include <vector>
|
|
# include <string>
|
|
# include <sstream>
|
|
# include <cstdlib> // atoi
|
|
|
|
enum http_method
|
|
{
|
|
GET = 1,
|
|
POST,
|
|
DELETE,
|
|
INVALID,
|
|
};
|
|
|
|
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
|