HttpClient.h
Go to the documentation of this file.
52 return send(createRequest(url)->setMethod(method)->setHeaders(headers)->onRequestComplete(requestComplete));
55 bool sendRequest(const HttpMethod method, const Url& url, const HttpHeaders& headers, const String& body,
58 return send(createRequest(url)->setMethod(method)->setHeaders(headers)->setBody(body)->onRequestComplete(
62 bool sendRequest(const HttpMethod method, const Url& url, const HttpHeaders& headers, String&& body,
100 bool downloadFile(const Url& url, const String& saveFileName, RequestCompletedDelegate requestComplete = nullptr);
HttpMethod
Strongly-typed enum which shadows http_method from http_parser library.
Definition: HttpCommon.h:42
Definition: HttpClient.h:29
bool sendRequest(const HttpMethod method, const Url &url, const HttpHeaders &headers, String &&body, RequestCompletedDelegate requestComplete) noexcept
Definition: HttpClient.h:62
bool send(HttpRequest *request)
bool sendRequest(const HttpMethod method, const Url &url, const HttpHeaders &headers, const String &body, RequestCompletedDelegate requestComplete)
Definition: HttpClient.h:55
bool downloadFile(const Url &url, const String &saveFileName, RequestCompletedDelegate requestComplete=nullptr)
Queue request to download a file.
bool downloadString(const Url &url, RequestCompletedDelegate requestComplete, size_t maxLength=NETWORK_SEND_BUFFER_SIZE)
Queue request to download content as string (in memory)
Definition: HttpClient.h:80
HttpRequest * createRequest(const Url &url)
Helper function to create a new request on a URL.
Definition: HttpClient.h:118
bool downloadFile(const Url &url, RequestCompletedDelegate requestComplete=nullptr)
Definition: HttpClient.h:89
bool sendRequest(const HttpMethod method, const Url &url, const HttpHeaders &headers, RequestCompletedDelegate requestComplete)
Definition: HttpClient.h:49
static HttpConnectionPool httpConnectionPool
Definition: HttpClient.h:139
bool sendRequest(const Url &url, RequestCompletedDelegate requestComplete)
Definition: HttpClient.h:44
static void cleanup()
Use this method to clean all object pools.
Definition: HttpClient.h:126
Memory stream operating on fixed-size buffer Once the limit is reached the stream will discard incomi...
Definition: LimitedMemoryStream.h:22
Implementation of a HashMap for owned objects, i.e. anything created with new().
Definition: ObjectMap.h:49