Navigation
API > API/Runtime > API/Runtime/HTTP
Inheritance Hierarchy
- FTSTickerObjectBase
- FHttpManager
References
| Module | HTTP |
| Header | /Engine/Source/Runtime/Online/HTTP/Public/HttpManager.h |
| Include | #include "HttpManager.h" |
Syntax
class FHttpManager : public FTSTickerObjectBase
Remarks
Manages Http request that are currently being processed
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bFlushing | This variable is set to true in Flush(EHttpFlushReason), and prevents new Http requests from being launched. | |
| TFunction< FString()> | CorrelationIdMethod | This method will be called to generate a CorrelationId on all requests being sent if one is not already set | |
| TMap< EHttpFlushReason, FHttpFlushTimeLimit > | FlushTimeLimitsMap | ||
| TQueue< TFunction< void()>, EQueueMode::Mpsc > | GameThreadQueue | Queue of tasks to run on the game thread | |
| FHttpManagerRequestAddedDelegate | RequestAddedDelegate | Delegate that will get called once request added | |
| FHttpManagerRequestCompletedDelegate | RequestCompletedDelegate | Delegate that will get called when a request completes | |
| TArray< FHttpRequestRef > | Requests | List of Http requests that are actively being processed | |
| FHttpThreadBase * | Thread | ||
| UE::Core::FURLRequestFilter | URLRequestFilter | Url request filter, if specified in the config, it will launch http request only when the url is in the allowlist |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FHttpManager () |
Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddGameThreadTask
(
TFunction< void()>&& Task |
Add task to be ran on the game thread next tick | |
| void | AddHttpThreadTask
(
TFunction< void()>&& Task |
Add task to be ran on the http thread next tick | |
| void | AddRequest
(
const FHttpRequestRef& Request |
Adds an Http request instance to the manager for tracking/ticking Manager should always have a list of requests currently being processed | |
| void | AddThreadedRequest
(
const TSharedRef< IHttpThreadedRequest, ESPMode::ThreadSafe >& Request |
Add a http request to be executed on the http thread | |
| void | BroadcastHttpRequestCompleted
(
const FHttpRequestRef& Request |
Broadcast that a non-threaded HTTP request is complete. | |
| void | CancelThreadedRequest
(
const TSharedRef< IHttpThreadedRequest, ESPMode::ThreadSafe >& Request |
Mark a threaded http request as cancelled to be removed from the http thread | |
| FString | Create a new correlation id for a request | ||
| FHttpThreadBase * | Create HTTP thread object | ||
| void | DumpRequests
(
FOutputDevice& Ar |
List all of the Http requests currently being processed | |
| void | Flush
(
EHttpFlushReason FlushReason |
Block until all pending requests are finished processing | |
| void | FlushTick
(
float DeltaSeconds |
Tick called during Flush | |
| TFunction< FString()> | Get the default method for creating new correlation ids for a request | ||
| bool | |||
| void | Initialize () |
Initialize | |
| bool | IsDomainAllowed
(
const FString& Url |
Determine if the domain is allowed to be accessed | |
| bool | IsValidRequest
(
const IHttpRequest* RequestPtr |
Find an Http request in the lists of current valid requests | |
| void | OnAfterFork () |
Inform that HTTP Manager that we have completed a fork(). | |
| void | OnBeforeFork () |
Inform that HTTP Manager that we are about to fork(). | |
| void | Inform the HTTP Manager that we finished ticking right after forking. | ||
| void | |||
| void | RemoveRequest
(
const FHttpRequestRef& Request |
Removes an Http request instance from the manager Presumably it is done being processed | |
| void | SetCorrelationIdMethod
(
TFunction< FString()> InCorrelationIdMethod |
Set the method used to set a Correlation id on each request, if one is not already specified. | |
| void | SetRequestAddedDelegate
(
const FHttpManagerRequestAddedDelegate& Delegate |
||
| void | SetRequestCompletedDelegate
(
const FHttpManagerRequestCompletedDelegate& Delegate |
||
| void | SetURLRequestFilter
(
const UE::Core::FURLRequestFilter& InURLRequestFilter |
Set url request filter through code, instead of setting it through config. | |
| void | Shutdown () |
Shutdown logic should be called before quiting | |
| bool | Method to check dynamic proxy setting support. | ||
| void | Update configuration. Called when config has been updated and we need to apply any changes. |
Overridden from FTSTickerObjectBase
Classes
| Type | Name | Description | |
|---|---|---|---|
| FHttpFlushTimeLimit |
Constants
| Name | Description |
|---|---|
| RequestLock | Used to lock access to add/remove/find requests |