Botcraft 26.3
Loading...
Searching...
No Matches
Https.cpp File Reference
#include "botcraft/Network/Https.hpp"
#include "botcraft/Utilities/Logger.hpp"
#include <asio/connect.hpp>
#include <asio/ip/tcp.hpp>
#include <asio/read.hpp>
#include <asio/read_until.hpp>
#include <asio/ssl.hpp>
#include <asio/streambuf.hpp>
#include <openssl/x509.h>
#include <algorithm>
#include <sstream>
#include <stdexcept>

Go to the source code of this file.

Namespaces

namespace  Botcraft
 

Functions

WebRequestResponse Botcraft::POSTRequest (const std::string &host, const std::string &endpoint, const std::string &content_type, const std::string &accept, const std::string &authorization, const std::string &data)
 Send a POST request with ssl stuff.
 
WebRequestResponse Botcraft::GETRequest (const std::string &host, const std::string &endpoint, const std::string &authorization="")
 Send a GET request with ssl stuff.
 
ProtocolCraft::Json::Value Botcraft::CheckJsonResponse (const WebRequestResponse &response, const std::string &s, const std::vector< std::string > &fields, const unsigned int expected_status=200)
 Check that a WebRequestResponse has the right fields and return code, throw if not.