![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <HttpManager.h>
Inheritance diagram for FHttpManager:Classes | |
| struct | FHttpFlushTimeLimit |
| struct | FHttpStatsHistory |
| struct | FUrlToMatch |
Static Public Member Functions | |
| static HTTP_API TFunction< FString()> | GetDefaultCorrelationIdMethod () |
Manages Http request that are currently being processed
| PRAGMA_DISABLE_DEPRECATION_WARNINGS FHttpManager::FHttpManager | ( | ) |
Constructor
|
virtual |
Destructor
Add task to be ran on the game thread next tick
| Task | The task to be ran next tick |
| TSharedPtr< IHttpTaskTimerHandle > FHttpManager::AddHttpThreadTask | ( | TFunction< void()> && | Task, |
| float | InDelay = 0.0f |
||
| ) |
Add task to be ran on the http thread
| Task | The task to be ran |
| InDelay | The delay to wait before running the task |
|
protected |
Add a http request to the manager without enqueueing the threaded execution
| Request | - the request object to add |
| void FHttpManager::AddThreadedRequest | ( | const TSharedRef< FHttpRequestCommon, ESPMode::ThreadSafe > & | Request | ) |
Add a http request to be executed on the http thread
| Request | - the request object to add |
|
protected |
Broadcast that a non-threaded HTTP request is complete. Called automatically internally for threaded requests. Called explicitly by non-threaded requests
| void FHttpManager::CancelThreadedRequest | ( | const TSharedRef< FHttpRequestCommon, ESPMode::ThreadSafe > & | Request | ) |
Mark a threaded http request as cancelled to be removed from the http thread
| Request | - the request object to cancel |
| FString FHttpManager::CreateCorrelationId | ( | ) | const |
Create a new correlation id for a request
|
protectedvirtual |
| void FHttpManager::DumpRequests | ( | FOutputDevice & | Ar | ) | const |
List all of the Http requests currently being processed
| Ar | - output device to log with |
| void FHttpManager::Flush | ( | EHttpFlushReason | FlushReason | ) |
Block until all pending requests are finished processing
| FlushReason | the flush reason will influence times waited to cancel ongoing http requests |
Tick called during Flush
| DeltaSeconds | - time in seconds since the last tick |
|
static |
Get the default method for creating new correlation ids for a request
|
inline |
|
protected |
|
protected |
Access http thread of http manager for internal usage
|
protected |
| PRAGMA_ENABLE_DEPRECATION_WARNINGS void FHttpManager::Initialize | ( | ) |
Initialize
|
protected |
| bool FHttpManager::IsDomainAllowed | ( | const FString & | Url | ) | const |
Determine if the domain is allowed to be accessed
| Url | the path to check domain on |
| bool FHttpManager::IsValidRequest | ( | const IHttpRequest * | RequestPtr | ) | const |
Find an Http request in the lists of current valid requests
| RequestPtr | - ptr to the http request object to find |
|
virtual |
|
virtual |
|
virtual |
Inform the HTTP Manager that we finished ticking right after forking. Only called on the forked process
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
|
protected |
Record platform specific stats
Record the requests waiting in flight, to have an idea if there are too many concurrent requests
Record the requests waiting in queue, to have an idea if there are too many requests or if request number limit is too small
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
|
protected |
| void FHttpManager::RemoveHttpThreadTask | ( | TSharedPtr< IHttpTaskTimerHandle > | HttpTaskTimerHandle | ) |
Remove the task from the http thread before it's triggered
| HttpTaskTimerHandle | The handle of the timer |
| void FHttpManager::RemoveRequest | ( | const FHttpRequestRef & | Request | ) |
Removes an Http request instance from the manager Presumably it is done being processed
| Request | - the request object to remove |
Set the method used to set a Correlation id on each request, if one is not already specified.
This method allows you to override the Engine default method.
| InCorrelationIdMethod | The method to use when sending a request, if no Correlation id is already set |
| void FHttpManager::SetRequestAddedDelegate | ( | const FHttpManagerRequestAddedDelegate & | Delegate | ) |
Set a delegate to be triggered when an http request added to http manager. NOTE: The delegate can be triggered from different threads, depends on which thread the request created. So make sure the delegate set here is thread-safe.
| void FHttpManager::SetRequestCompletedDelegate | ( | const FHttpManagerRequestCompletedDelegate & | Delegate | ) |
Set a delegate to be triggered when an http request completed. NOTE: The delegate can be triggered from different threads, it depends on the delegate policy set to each http request. So make sure the delegate set here is thread-safe.
|
inline |
Set url request filter through code, instead of setting it through config.
| InURLRequestFilter | The request filter to set |
|
protected |
|
protected |
| void FHttpManager::Shutdown | ( | ) |
Shutdown logic should be called before quiting
|
virtual |
Method to check dynamic proxy setting support.
FTSTicker callback
| DeltaSeconds | - time in seconds since the last tick |
Implements FTSTickerObjectBase.
|
virtual |
Update configuration. Called when config has been updated and we need to apply any changes.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Used to lock access to get completed requests
|
protected |
This method will be called to generate a CorrelationId on all requests being sent if one is not already set
|
protected |
|
protected |
Ticker to run game thread tasks
|
protected |
|
protected |
|
protected |
|
protected |
Delegate that will get called once request added
|
protected |
Delegate that will get called when a request completes
|
mutableprotected |
Used to lock access to add/remove/find requests
|
protected |
List of Http requests that are actively being processed
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
protected |
Url request filter, if specified in the config, it will launch http request only when the url is in the allowlist