Files
42_INT_12_webserv/srcs/utils.hpp
LuckyLaszlo 8f167d85f3 wip integration of client.request and ServerConfig
+ Client get return reference
+ wip binary flags for http_method
+ moved config parser files
2022-08-02 21:11:54 +02:00

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