neoGFX
Cross-platform C++ app/game engine
|
#include <http.hpp>
Public Types | |
enum | type_e { Get , Post } |
typedef std::map< ci_string, std::string > | headers_t |
typedef std::vector< char > | body_t |
Public Member Functions | |
define_event (Started, started) define_event(Progress | |
progress | define_event (Completed, completed) define_event(Failure |
http (async_task &aIoTask) | |
http (const http &aOther) | |
virtual | ~http () |
http & | operator= (const http &aOther) |
bool | operator== (const http &) const |
void | request (const std::string &aUrl, type_e aType=Get, const headers_t &aRequestHeaders=headers_t(), const std::variant< body_t, std::string > &aRequestBody=std::string()) |
void | request (const std::string &aHost, const std::string &aResource, type_e aType=Get, unsigned short aPort=80, bool aSecure=false, const headers_t &aRequestHeaders=headers_t(), const std::variant< body_t, std::string > &aRequestBody=std::string()) |
bool | ok () const |
uint32_t | status_code () const |
uint64_t | body_length () const |
const std::string & | response_status () const |
const headers_t & | response_headers () const |
const body_t & | body () const |
std::string | body_as_string () const |
double | percent_done () const |
typedef std::vector<char> neolib::http::body_t |
typedef std::map<ci_string, std::string> neolib::http::headers_t |
neolib::http::http | ( | async_task & | aIoTask | ) |
|
virtual |
neolib::http::define_event | ( | Started | , |
started | |||
) |
double neolib::http::percent_done | ( | ) | const |
void neolib::http::request | ( | const std::string & | aHost, |
const std::string & | aResource, | ||
type_e | aType = Get , |
||
unsigned short | aPort = 80 , |
||
bool | aSecure = false , |
||
const headers_t & | aRequestHeaders = headers_t() , |
||
const std::variant< body_t, std::string > & | aRequestBody = std::string() |
||
) |
void neolib::http::request | ( | const std::string & | aUrl, |
type_e | aType = Get , |
||
const headers_t & | aRequestHeaders = headers_t() , |
||
const std::variant< body_t, std::string > & | aRequestBody = std::string() |
||
) |
|
inline |