PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | Static Public Member Functions | List of all members
PIHTTPClient Class Reference

Asynchronous HTTP client request with completion callbacks. More...

#include <pihttpclient.h>

Inherits PIHTTPClientBase.

Public Member Functions

PIHTTPClientonFinish (std::function< void()> f)
 Sets a callback invoked when the transfer completes successfully.
 
PIHTTPClientonFinish (std::function< void(const PIHTTP::MessageConst &)> f)
 Sets a callback invoked when the transfer completes successfully and provides the parsed reply.
 
PIHTTPClientonError (std::function< void()> f)
 Sets a callback invoked when the transfer fails with a transport-level error.
 
PIHTTPClientonError (std::function< void(const PIHTTP::MessageConst &)> f)
 Sets a callback invoked when the transfer fails with a transport-level error and provides the partial reply state.
 
PIHTTPClientonAbort (std::function< void()> f)
 Sets a callback invoked when the request is aborted.
 
PIHTTPClientonAbort (std::function< void(const PIHTTP::MessageConst &)> f)
 Sets a callback invoked when the request is aborted and provides the current reply state.
 
PIHTTPClientignoreSSLErrors ()
 Disables SSL verification checks for this request. Call before start().
 
void start ()
 Queues the request for asynchronous execution.
 
void abort ()
 Requests cancellation of the running transfer.
 
PIString lastError () const
 Returns the last transport error message.
 

Static Public Member Functions

static PIHTTPClientcreate (const PIString &url, PIHTTP::Method method=PIHTTP::Method::Get, const PIHTTP::MessageConst &req={})
 Creates a request object for the specified URL, method and initial message data.
 

Detailed Description

Asynchronous HTTP client request with completion callbacks.