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

Http async client. More...

#include <HttpClient.h>

Public Member Functions

Result get (AsyncEventLoop &loop, StringSpan url)
 Setups this client to execute a GET request on the given url.
 
StringSpan getResponse () const
 Get the response StringSpan sent by the server.
 
Result setCustomDebugName (const StringSpan debugName)
 

Public Attributes

Delegate< HttpClient & > callback
 The callback that is called after GET operation succeeded.
 

Detailed Description

Http async client.

Member Function Documentation

◆ get()

Result SC::HttpClient::get ( AsyncEventLoop & loop,
StringSpan url )

Setups this client to execute a GET request on the given url.

Parameters
loopThe AsyncEventLoop to use for monitoring network packets
urlThe url to GET
Returns
Valid Result if dns resolution and creation of underlying client tcp socket succeeded

◆ getResponse()

StringSpan SC::HttpClient::getResponse ( ) const
nodiscard

Get the response StringSpan sent by the server.

Member Data Documentation

◆ callback

Delegate<HttpClient&> SC::HttpClient::callback

The callback that is called after GET operation succeeded.


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