Navigation
API > API/Runtime > API/Runtime/HTTP
Manages Http request that are currently being processed
| Name | FHttpManager |
| Type | class |
| Header File | /Engine/Source/Runtime/Online/HTTP/Public/HttpManager.h |
| Include Path | #include "HttpManager.h" |
Syntax
class FHttpManager : public FTSTickerObjectBase
Inheritance Hierarchy
- FTSTickerObjectBase → FHttpManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FHttpManager() |
Constructor | HttpManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FHttpManager() |
Destructor | HttpManager.h |
Structs
| Name | Remarks |
|---|---|
| FHttpFlushTimeLimit | |
| FHttpStatsHistory | |
| FMockResponse | |
| FUrlToMatch |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddGameThreadTask
(
TFunction< void()>&& Task, |
Add task to be ran on the game thread next tick | HttpManager.h | |
TSharedPtr< IHttpTaskTimerHandle > AddHttpThreadTask
(
TFunction< void()>&& Task, |
Add task to be ran on the http thread | HttpManager.h | |
void AddThreadedRequest
(
const TSharedRef< FHttpRequestCommon, ESPMode::ThreadSafe >& Request |
Add a http request to be executed on the http thread | HttpManager.h | |
void CancelThreadedRequest
(
const TSharedRef< FHttpRequestCommon, ESPMode::ThreadSafe >& Request |
Mark a threaded http request as cancelled to be removed from the http thread | HttpManager.h | |
FString CreateCorrelationId() |
Create a new correlation id for a request | HttpManager.h | |
void DumpRequests
(
FOutputDevice& Ar |
List all of the Http requests currently being processed | HttpManager.h | |
void Flush
(
EHttpFlushReason FlushReason |
Block until all pending requests are finished processing | HttpManager.h | |
virtual void FlushTick
(
float DeltaSeconds |
Tick called during Flush | HttpManager.h | |
FHttpStats GetHttpStats() |
HttpManager.h | ||
void Initialize() |
Initialize | HttpManager.h | |
bool IsDomainAllowed
(
const FString& Url |
Determine if the domain is allowed to be accessed | HttpManager.h | |
bool IsValidRequest
(
const IHttpRequest* RequestPtr |
Find an Http request in the lists of current valid requests | HttpManager.h | |
virtual void OnAfterFork () |
Inform that HTTP Manager that we have completed a fork(). | HttpManager.h | |
virtual void OnBeforeFork () |
Inform that HTTP Manager that we are about to fork(). | HttpManager.h | |
virtual void OnEndFramePostFork () |
Inform the HTTP Manager that we finished ticking right after forking. | HttpManager.h | |
void RemoveHttpThreadTask
(
TSharedPtr< IHttpTaskTimerHandle > HttpTaskTimerHandle |
Remove the task from the http thread before it's triggered | HttpManager.h | |
void RemoveRequest
(
const FHttpRequestRef& Request |
Removes an Http request instance from the manager Presumably it is done being processed | HttpManager.h | |
void SetCorrelationIdMethod
(
TFunction< FString()> InCorrelationIdMethod |
Set the method used to set a Correlation id on each request, if one is not already specified. | HttpManager.h | |
void SetRequestAddedDelegate
(
const FHttpManagerRequestAddedDelegate& Delegate |
Set a delegate to be triggered when an http request added to http manager. | HttpManager.h | |
void SetRequestCompletedDelegate
(
const FHttpManagerRequestCompletedDelegate& Delegate |
Set a delegate to be triggered when an http request completed. | HttpManager.h | |
void SetURLRequestFilter
(
const UE::Core::FURLRequestFilter& InURLRequestFilter |
Set url request filter through code, instead of setting it through config. | HttpManager.h | |
void Shutdown() |
Shutdown logic should be called before quiting | HttpManager.h | |
virtual bool SupportsDynamicProxy() |
Method to check dynamic proxy setting support. | HttpManager.h | |
virtual void UpdateConfigs() |
Update configuration. Called when config has been updated and we need to apply any changes. | HttpManager.h |
Overridden from FTSTickerObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Tick
(
float DeltaSeconds |
FTSTicker callback | HttpManager.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddRequest
(
const FHttpRequestRef& Request |
Add a http request to the manager without enqueueing the threaded execution | HttpManager.h | |
void BroadcastHttpRequestCompleted
(
const FHttpRequestRef& Request |
Broadcast that a non-threaded HTTP request is complete. | HttpManager.h | |
virtual FHttpThreadBase * CreateHttpThread() |
Create HTTP thread object | HttpManager.h | |
TOptional< FMockResponse > GetMockResponse
(
FStringView Url, |
HttpManager.h | ||
FHttpThreadBase * GetThread() |
Access http thread of http manager for internal usage | HttpManager.h | |
bool HasAnyBoundDelegate() |
HttpManager.h | ||
bool IsCurrentThreadCompletingRequest() |
HttpManager.h | ||
void MarkCurrentThreadCompletingRequest
(
bool bCompleting |
HttpManager.h | ||
void RecordMaxTimeToWaitInQueue
(
float Duration |
Record the time to wait in queue, to have a general idea how long the client usually wait before actually starting, to adjust the requests | HttpManager.h | |
void RecordPlatformStats
(
const FHttpStatsPlatform& PlatformStats |
Record platform specific stats | HttpManager.h | |
void RecordStatRequestsInFlight
(
uint32 RequestsInFlight |
Record the requests waiting in flight, to have an idea if there are too many concurrent requests | HttpManager.h | |
void RecordStatRequestsInQueue
(
uint32 RequestsInQueue |
Record the requests waiting in queue, to have an idea if there are too many requests or if request number limit is too small | HttpManager.h | |
void RecordStatTimeToConnect
(
float Duration |
Record the time to connect, to have a general idea how long the client usually take to connect for success requests, to adjust the connection timeout | HttpManager.h | |
void ReloadFlushTimeLimits() |
HttpManager.h | ||
bool ShouldDisableFailedLog
(
FStringView Url |
HttpManager.h | ||
bool ShouldLogResponse
(
FStringView Url |
HttpManager.h | ||
void UpdateUrlPatternsToDisableFailedLog
(
IConsoleVariable* CVar |
HttpManager.h | ||
void UpdateUrlPatternsToLogResponse
(
IConsoleVariable* CVar |
HttpManager.h | ||
void UpdateUrlPatternsToMockResponse
(
IConsoleVariable* CVar |
HttpManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Get the default method for creating new correlation ids for a request | HttpManager.h |