UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::IoStore::FMultiEndpointHttpClient Class Reference

#include <OnDemandHttpClient.h>

Public Types

using FHttpTicketId = uint32
 
using FOnHttpResponse = TFunction< void(FMultiEndpointHttpClientResponse &&)>
 

Public Member Functions

 UE_NONCOPYABLE (FMultiEndpointHttpClient)
 
 ~FMultiEndpointHttpClient ()
 
FHttpTicketId Get (const FOnDemandHostGroup &HostGroup, FAnsiStringView RelativeUrl, FOnHttpResponse &&OnResponse)
 
FHttpTicketId Get (const FOnDemandHostGroup &HostGroup, FAnsiStringView RelativeUrl, const FIoOffsetAndLength &ChunkRange, FOnHttpResponse &&OnResponse)
 
FHttpTicketId Get (const FOnDemandHostGroup &HostGroup, FAnsiStringView RelativeUrl, const FIoOffsetAndLength &ChunkRange, TArray< FAnsiString > &&Headers, EMultiEndpointRequestFlags Flags, FOnHttpResponse &&OnResponse)
 
bool Tick (int32 WaitTimeMs, uint32 MaxKiBPerSecond)
 
bool Tick ()
 
void CancelRequest (FHttpTicketId TicketId)
 
void UpdateConnections ()
 

Static Public Member Functions

static TUniquePtr< FMultiEndpointHttpClientCreate (const FMultiEndpointHttpClientConfig &Config)
 
static TIoStatusOr< FMultiEndpointHttpClientResponseGet (FAnsiStringView Url, const FMultiEndpointHttpClientConfig &Config)
 

Detailed Description

Todo - More documentation on the client behavior.

Retry policy: If a request fails then the client will retry it up to FMultiEndpointHttpClientConfig::MaxRetryCount times. The first retry attempt will use the primary host with each subsequent attempt cycling to the next host in the FOnDemandHostGroup. If the end of the group is reached with retries remaining then the cycle will begin again at the start of the group.

See also
FOnDemandHostGroup for more info on how the host cycling works.

Member Typedef Documentation

◆ FHttpTicketId

◆ FOnHttpResponse

Constructor & Destructor Documentation

◆ ~FMultiEndpointHttpClient()

UE::IoStore::FMultiEndpointHttpClient::~FMultiEndpointHttpClient ( )

Member Function Documentation

◆ CancelRequest()

void UE::IoStore::FMultiEndpointHttpClient::CancelRequest ( FHttpTicketId  TicketId)

◆ Create()

TUniquePtr< FMultiEndpointHttpClient > UE::IoStore::FMultiEndpointHttpClient::Create ( const FMultiEndpointHttpClientConfig Config)
static

◆ Get() [1/4]

FMultiEndpointHttpClient::FHttpTicketId UE::IoStore::FMultiEndpointHttpClient::Get ( const FOnDemandHostGroup HostGroup,
FAnsiStringView  RelativeUrl,
const FIoOffsetAndLength ChunkRange,
FOnHttpResponse &&  OnResponse 
)

◆ Get() [2/4]

FMultiEndpointHttpClient::FHttpTicketId UE::IoStore::FMultiEndpointHttpClient::Get ( const FOnDemandHostGroup HostGroup,
FAnsiStringView  RelativeUrl,
const FIoOffsetAndLength ChunkRange,
TArray< FAnsiString > &&  Headers,
EMultiEndpointRequestFlags  Flags,
FOnHttpResponse &&  OnResponse 
)

◆ Get() [3/4]

FMultiEndpointHttpClient::FHttpTicketId UE::IoStore::FMultiEndpointHttpClient::Get ( const FOnDemandHostGroup HostGroup,
FAnsiStringView  RelativeUrl,
FOnHttpResponse &&  OnResponse 
)

◆ Get() [4/4]

TIoStatusOr< FMultiEndpointHttpClientResponse > UE::IoStore::FMultiEndpointHttpClient::Get ( FAnsiStringView  Url,
const FMultiEndpointHttpClientConfig Config 
)
static

Blocking method

◆ Tick() [1/2]

bool UE::IoStore::FMultiEndpointHttpClient::Tick ( )
inline

◆ Tick() [2/2]

bool UE::IoStore::FMultiEndpointHttpClient::Tick ( int32  WaitTimeMs,
uint32  MaxKiBPerSecond 
)

Process the underlying http client.

Parameters
WaitTimeMsHow long (in milliseconds) should the underlying http client wait for poll events before returning.
MaxKiBPerSecondThe max amount of bandwidth that the underlying http client should use per second. A value of zero indicates that the bandwidth use should not be capped.
Returns
True if the client still has work pending and more Tick calls will be needed, false if all work has been completed.

◆ UE_NONCOPYABLE()

UE::IoStore::FMultiEndpointHttpClient::UE_NONCOPYABLE ( FMultiEndpointHttpClient  )

◆ UpdateConnections()

void UE::IoStore::FMultiEndpointHttpClient::UpdateConnections ( )

The documentation for this class was generated from the following files: