Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::HttpClientOperationListener Struct Reference

Listener receiving response notifications during HttpClientOperation::poll. More...

#include <HttpClient.h>

Inheritance diagram for SC::HttpClientOperationListener:
SC::HttpClientAsyncT< T_AsyncEventLoop, T_AsyncStreams >

Public Member Functions

virtual void onResponseHead (HttpClientResponse &response)
 Called once the response status code and headers are available.
 
virtual void onResponseBody (Span< const char > data)
 Called for each response body chunk delivered by poll()
 
virtual void onResponseComplete ()
 Called when the response body completed successfully.
 
virtual void onError (Result error)
 Called when the request fails.
 

Detailed Description

Listener receiving response notifications during HttpClientOperation::poll.

Member Function Documentation

◆ onError()

virtual void SC::HttpClientOperationListener::onError ( Result error)
inlinevirtual

Called when the request fails.

Parameters
errorOperation failure

◆ onResponseBody()

virtual void SC::HttpClientOperationListener::onResponseBody ( Span< const char > data)
inlinevirtual

Called for each response body chunk delivered by poll()

Parameters
dataBody bytes valid for the duration of the callback

◆ onResponseComplete()

virtual void SC::HttpClientOperationListener::onResponseComplete ( )
inlinevirtual

Called when the response body completed successfully.

◆ onResponseHead()

virtual void SC::HttpClientOperationListener::onResponseHead ( HttpClientResponse & response)
inlinevirtual

Called once the response status code and headers are available.

Parameters
responseParsed response metadata owned by the current operation

The documentation for this struct was generated from the following file: