add MP.HttpsGET, MP.HttpsPOST

This commit is contained in:
Lion Kortlepel
2021-07-01 00:33:28 +02:00
parent 8853cef809
commit 44e0f3aa21
5 changed files with 188 additions and 42 deletions

View File

@@ -4,6 +4,7 @@
#include <unordered_map>
namespace Http {
std::string GET(const std::string& host, int port, const std::string& target);
std::string POST(const std::string& host, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, const std::string& ContentType);
std::string GET(const std::string& host, int port, const std::string& target, unsigned int* status = nullptr);
std::string POST(const std::string& host, int port, const std::string& target, const std::unordered_map<std::string, std::string>& fields, const std::string& body, const std::string& ContentType, unsigned int* status = nullptr);
static inline const char* ErrorString = "!BeamMPHttpsError!";
}