LootLocker Unreal SDK 10.4.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
FLootLockerHTTPRequestData Struct Reference

Captures everything needed to dispatch — and later retry — a single SDK HTTP request. More...

#include <LootLockerHTTPRequestData.h>

Collaboration diagram for FLootLockerHTTPRequestData:

Public Member Functions

void CallListenersWithResult (const FLootLockerResponse &Response)
 Invokes every registered Listener with the supplied Response.
 
bool operator== (const FLootLockerHTTPRequestData &Other) const
 
bool operator!= (const FLootLockerHTTPRequestData &Other) const
 

Data Fields

FString RequestId = TEXT("")
 Unique identifier for this request.
 
FString ForPlayerUlid = TEXT("")
 ULID of the player this request is being made on behalf of.
 
FString Endpoint = TEXT("")
 Fully-formed URL endpoint (before any run-time query-param appending).
 
FString Verb = TEXT("")
 HTTP verb ("GET", "POST", "PUT", "PATCH", "DELETE", …).
 
FString Body = TEXT("")
 JSON body string.
 
TMap< FString, FString > ExtraHeaders
 Additional headers to merge on top of the SDK defaults for this request.
 
FLootLockerPlayerData PlayerData
 Player session data used for auth-token injection and session-refresh decisions.
 
TArray< FResponseCallbackListeners
 Registered completion callbacks.
 
int32 TimesRetried = 0
 Number of retry attempts made for this request so far.
 
double RequestStartTime = 0.0
 Wall-clock time (FPlatformTime::Seconds()) when the request was first submitted to the queue.
 
FDateTime RequestStartDateTime = FDateTime(0)
 UTC calendar time when the request was first submitted to the queue.
 
bool HaveListenersBeenInvoked = false
 True once all Listeners have been invoked via CallListenersWithResult().
 
bool bIsFileUpload = false
 True when this request represents a file upload rather than a JSON call.
 
FString FilePath = TEXT("")
 Absolute path to the file to upload (only used when bIsFileUpload is true).
 
TMap< FString, FString > AdditionalFields
 Additional form-data fields to include alongside the file (only used when bIsFileUpload is true).
 

Detailed Description

Captures everything needed to dispatch — and later retry — a single SDK HTTP request.

Instances are created by ULootLockerHttpClient::SendApi() / UploadFile() and enqueued into FLootLockerHTTPExecutionQueue.

Member Function Documentation

◆ CallListenersWithResult()

void FLootLockerHTTPRequestData::CallListenersWithResult ( const FLootLockerResponse Response)

Invokes every registered Listener with the supplied Response.

Exceptions thrown inside individual listeners are caught and logged so that remaining listeners are still called. Sets HaveListenersBeenInvoked = true after all listeners have been attempted.

◆ operator!=()

bool FLootLockerHTTPRequestData::operator!= ( const FLootLockerHTTPRequestData Other) const
inline

◆ operator==()

bool FLootLockerHTTPRequestData::operator== ( const FLootLockerHTTPRequestData Other) const
inline

Field Documentation

◆ AdditionalFields

TMap<FString, FString> FLootLockerHTTPRequestData::AdditionalFields

Additional form-data fields to include alongside the file (only used when bIsFileUpload is true).

◆ bIsFileUpload

bool FLootLockerHTTPRequestData::bIsFileUpload = false

True when this request represents a file upload rather than a JSON call.

◆ Body

FString FLootLockerHTTPRequestData::Body = TEXT("")

JSON body string.

Empty for GET/HEAD/OPTIONS requests and file uploads.

◆ Endpoint

FString FLootLockerHTTPRequestData::Endpoint = TEXT("")

Fully-formed URL endpoint (before any run-time query-param appending).

◆ ExtraHeaders

TMap<FString, FString> FLootLockerHTTPRequestData::ExtraHeaders

Additional headers to merge on top of the SDK defaults for this request.

◆ FilePath

FString FLootLockerHTTPRequestData::FilePath = TEXT("")

Absolute path to the file to upload (only used when bIsFileUpload is true).

◆ ForPlayerUlid

FString FLootLockerHTTPRequestData::ForPlayerUlid = TEXT("")

ULID of the player this request is being made on behalf of.

Used to look up the player's session state for auth-token injection and session-refresh decisions.

◆ HaveListenersBeenInvoked

bool FLootLockerHTTPRequestData::HaveListenersBeenInvoked = false

True once all Listeners have been invoked via CallListenersWithResult().

Prevents double-delivery if a retry path calls the method more than once.

◆ Listeners

TArray<FResponseCallback> FLootLockerHTTPRequestData::Listeners

Registered completion callbacks.

All are invoked (in registration order) when the request finishes — whether successfully or not. Use CallListenersWithResult() to invoke them safely.

◆ PlayerData

FLootLockerPlayerData FLootLockerHTTPRequestData::PlayerData

Player session data used for auth-token injection and session-refresh decisions.

Copied at enqueue time so the request carries a stable snapshot.

◆ RequestId

FString FLootLockerHTTPRequestData::RequestId = TEXT("")

Unique identifier for this request.

Assigned as a GUID at request creation time; used for queue lookup, deduplication, and correlation in logs.

◆ RequestStartDateTime

FDateTime FLootLockerHTTPRequestData::RequestStartDateTime = FDateTime(0)

UTC calendar time when the request was first submitted to the queue.

Stored alongside RequestStartTime so that FLootLockerRequestContext::RequestTime can be populated as a formatted string for logging and error reporting.

◆ RequestStartTime

double FLootLockerHTTPRequestData::RequestStartTime = 0.0

Wall-clock time (FPlatformTime::Seconds()) when the request was first submitted to the queue.

◆ TimesRetried

int32 FLootLockerHTTPRequestData::TimesRetried = 0

Number of retry attempts made for this request so far.

◆ Verb

FString FLootLockerHTTPRequestData::Verb = TEXT("")

HTTP verb ("GET", "POST", "PUT", "PATCH", "DELETE", …).