Web framework C++  2.0.0
Simple web framework on c++ designed to easily create web pages, etc
parser_http.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "request.h"
4 #include "response.h"
5 
11 class ParserHTTP {
12 public:
21  static Request * getRequestFromStr(std::string & str);
22 
31  static std::string getStrFromResponse(Response & response);
32 
41  static std::string urlEncode(const std::string & value);
42 
51  static std::string urlDecode(const std::string & value);
52 
63  static std::string getTime(const time_t * time_struct = nullptr, const char * format = "%Y.%m.%d");
64 
70  static std::string trim(std::string & str);
71 
78  static std::string sha256(std::string & key, std::string & message);
79 
85  static std::string base64Encode(std::string & value);
86 
92  static std::string base64Decode(std::string & value);
93 };
class wrapper of HTTP response
Definition: response.h:13
static Request * getRequestFromStr(std::string &str)
static std::string base64Decode(std::string &value)
static std::string getStrFromResponse(Response &response)
static class for parsing, encoding, decoding any http data
Definition: parser_http.h:11
class wrapper of HTTP request
Definition: request.h:14
static std::string getTime(const time_t *time_struct=nullptr, const char *format="%Y.%m.%d")
static std::string urlEncode(const std::string &value)
static std::string urlDecode(const std::string &value)
static std::string trim(std::string &str)
static std::string sha256(std::string &key, std::string &message)
static std::string base64Encode(std::string &value)