8 #ifndef FACEBOOK_NETWORK_HTTPS_CLIENT_H
9 #define FACEBOOK_NETWORK_HTTPS_CLIENT_H
52 class CurlSessionData;
89 static bool url2uri(
const std::string& url, std::string& protocol, std::string& host, std::string& uri);
93 #if defined(__APPLE__)
120 static bool httpsPostRequestApple(
const std::string& url,
const uint8_t* requestData,
const size_t requestDataSize,
Buffer& data,
const Port& port,
const double timeout,
const Strings& additionalHeaders);
This class implements a container for callback functions.
Definition: Callback.h:3456
@ TYPE_READABLE
Readable endian type which is platform specific.
Definition: Data.h:37
This class implements a HTTPS Client supporting GET and POST requests.
Definition: HTTPSClient.h:27
static bool url2uri(const std::string &url, std::string &protocol, std::string &host, std::string &uri)
Converts a URL to a URI.
static bool httpsGetRequest(const std::string &url, Buffer &data, const Port &port=Port(443, Port::TYPE_READABLE), const double timeout=5.0, bool *abort=nullptr, const ProgressCallback &progressCallback=ProgressCallback())
Function to executes a HTTPS GET (site/file download) request.
Callback< void, size_t, size_t > ProgressCallback
Callback for receiving progress information when performing a HTTP request.
Definition: HTTPSClient.h:45
static bool httpsPostRequest(const std::string &url, const uint8_t *requestData, const size_t requestDataSize, Buffer &data, const Port &port=Port(443, Port::TYPE_READABLE), const double timeout=5.0, const Strings &additionalHeaders=Strings())
Function to executes a HTTPS POST (site/file upload) request.
std::vector< uint8_t > Buffer
Definition of a vector holding characters.
Definition: HTTPSClient.h:33
std::vector< std::string > Strings
Definition of a vector holding strings.
Definition: HTTPSClient.h:38
static bool httpsPostRequestApple(const std::string &url, const uint8_t *requestData, const size_t requestDataSize, Buffer &data, const Port &port, const double timeout, const Strings &additionalHeaders)
Function to executes a HTTPS POST (site/file upload) request (specialized function for Apple platform...
static bool httpsGetRequestApple(const std::string &url, Buffer &data, const Port &port, const double timeout, bool *abort, const ProgressCallback &progressCallback)
Function to executes a HTTPS GET (site/file download) request (specialized function for Apple platfor...
This class wraps a port number with 16 bits.
Definition: Port.h:26
std::vector< std::string > Strings
Definition of a vector holding strings.
Definition: Base.h:162
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15