FHttpManager

Inheritance Hierarchy

FTickerObjectBase

FHttpManager

Syntax

class FHttpManager : public FTickerObjectBase

Remarks

Manages Http request that are currently being processed

Variables

Name Description

Protected variable

TFunction < FStr ...

 

CorrelationIdMethod

This method will be called to generate a CorrelationId on all requests being sent if one is not already set

Protected variable

float

 

DeferredDestroyDelay

Delay in seconds to defer deletion of requests

Protected variable

TArray < FReques ...

 

PendingDestroyRequests

Dead requests that need to be destroyed

Protected variable

TArray < TShared ...

 

Requests

List of Http requests that are actively being processed

Protected variable

FHttpThread ...

 

Thread

Constructors

Name Description

Public function

FHttpManager()

Constructor

Destructors

Name Description

Public function

~FHttpManager()

Destructor

Functions

Name Description

Public function

void

 

AddRequest

(
    const TSharedRef < IHttpRequest >& ...
)

Adds an Http request instance to the manager for tracking/ticking Manager should always have a list of requests currently being processed

Public function

void

 

AddThreadedRequest

(
    const TSharedRef < IHttpThreadedRequ...
)

Add a http request to be executed on the http thread

Public function

void

 

CancelThreadedRequest

(
    const TSharedRef < IHttpThreadedRequ...
)

Mark a threaded http request as cancelled to be removed from the http thread

Public function Const

FString

 

CreateCorrelationId()

Create a new correlation id for a request

Protected function Virtual

FHttpThread ...

 

CreateHttpThread()

Create HTTP thread object

Public function Const

void

 

DumpRequests

(
    FOutputDevice & Ar
)

List all of the Http requests currently being processed

Public function

void

 

Flush

(
    bool bShutdown
)

Block until all pending requests are finished processing

Public function Static

TFunction < F ...

 

GetDefaultCorrelationIdMethod()

Get the default method for creating new correlation ids for a request

Public function

void

 

Initialize()

Initialize

Public function Const

bool

 

IsDomainAllowed

(
    const FString & Url
)

Determine if the domain is allowed to be accessed

Public function Const

bool

 

IsValidRequest

(
    const IHttpRequest * RequestPtr
)

Find an Http request in the lists of current valid requests

Public function

void

 

RemoveRequest

(
    const TSharedRef < IHttpRequest >& ...
)

Removes an Http request instance from the manager Presumably it is done being processed

Public function

void

 

SetCorrelationIdMethod

(
    TFunction < FString ()> InCorrelation...
)

Set the method used to set a Correlation id on each request, if one is not already specified.

Public function Virtual Const

bool

 

SupportsDynamicProxy()

Method to check dynamic proxy setting support.

Overridden from FTickerObjectBase

Name Description

Public function Virtual

bool

 

Tick

(
    float DeltaSeconds
)

FTicker callback

Classes

Name

Description

Protected class

FRequestPendingDestroy

Keep track of a request that should be deleted later

Constants

Name

Description

RequestLock

Used to lock access to add/remove/find requests

References

Module

HTTP

Header

Runtime/Online/HTTP/Public/HttpManager.h