You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and dots ('.'), can be up to 35 characters long. Letters must be lowercase.
44 lines
862 B
44 lines
862 B
#pragma once |
|
|
|
#include <commun.h> |
|
#include "http_tools.h" |
|
|
|
using HttpParams = std::unordered_map<std::string, std::string>; |
|
|
|
class HttpRequest |
|
{ |
|
public: |
|
HttpRequest(std::string method, |
|
std::string url, |
|
std::string version, |
|
HttpParams params, |
|
std::string body); |
|
|
|
HttpRequest(std::string data); |
|
|
|
std::string to_string(); |
|
|
|
std::string method; |
|
std::string url; |
|
std::string version; |
|
HttpParams params; |
|
std::string body; |
|
}; |
|
|
|
class HttpReponse |
|
{ |
|
public: |
|
HttpReponse(std::string status, |
|
std::string version, |
|
HttpParams params, |
|
std::string body); |
|
|
|
HttpReponse(std::string data); |
|
|
|
std::string to_string(); |
|
|
|
std::string status; |
|
std::string version; |
|
HttpParams params; |
|
std::string body; |
|
}; |