Navigation
API > API/Runtime > API/Runtime/HTTP
Module for Http request implementations Use FHttpFactory to create a new Http request
| Name | FHttpModule |
| Type | class |
| Header File | /Engine/Source/Runtime/Online/HTTP/Public/HttpModule.h |
| Include Path | #include "HttpModule.h" |
Syntax
class FHttpModule :
public IModuleInterface ,
public FSelfRegisteringExec
Inheritance Hierarchy
- FExec → FSelfRegisteringExec → FHttpModule
Implements Interfaces
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Singleton | FHttpModule * | Singleton for the module while loaded and available | HttpModule.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllowedDomains | TArray< FString > | List of domains that can be accessed. If Empty then no filtering is applied | HttpModule.h | |
| bEnableHttp | bool | Toggles http requests | HttpModule.h | |
| bSupportsDynamicProxy | bool | Whether or not the http implementation we are using supports dynamic proxy setting. | HttpModule.h | |
| bUseNullHttp | bool | Toggles null (mock) http requests | HttpModule.h | |
| DefaultHeaders | TMap< FString, FString > | Default headers - each request will include these headers, using the default value if not overridden | HttpModule.h | |
| HttpDelayTime | float | Total time to delay the request | HttpModule.h | |
| HttpEventLoopThreadTickIntervalInSeconds | float | Time in seconds between explicit calls to tick requests when using an event loop to run http requests. | HttpModule.h | |
| HttpManager | FHttpManager * | Keeps track of Http requests while they are being processed | HttpModule.h | |
| HttpMaxConnectionsPerServer | int32 | Max number of simultaneous connections to a specific server | HttpModule.h | |
| HttpNoProxy | FString | The domains which won't use proxy even if the ProxyAddress is set, in format "127.0.0.1,localhost,example.com" | HttpModule.h | |
| HttpReceiveTimeout | float | Timeout in seconds to receive a response on the connection | HttpModule.h | |
| HttpSendTimeout | float | Timeout in seconds to send a request on the connection | HttpModule.h | |
| HttpThreadActiveFrameTimeInSeconds | float | Time in seconds to use as frame time when actively processing requests. 0 means no frame time. | HttpModule.h | |
| HttpThreadActiveMinimumSleepTimeInSeconds | float | Time in seconds to sleep minimally when actively processing requests. | HttpModule.h | |
| HttpThreadIdleFrameTimeInSeconds | float | Time in seconds to use as frame time when idle, waiting for requests. 0 means no frame time. | HttpModule.h | |
| HttpThreadIdleMinimumSleepTimeInSeconds | float | Time in seconds to sleep minimally when idle, waiting for requests. | HttpModule.h | |
| MaxReadBufferSize | int32 | Max buffer size for individual http reads | HttpModule.h | |
| ProxyAddress | FString | The address to use for proxy, in format IPADDRESS:PORT | HttpModule.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddDefaultHeader
(
const FString& HeaderName, |
Add a default header to be appended to future requests If a request already specifies this header, then the defaulted version will not be used | HttpModule.h | |
virtual TSharedRef< IHttpRequest, ESPMode::ThreadSafe > CreateRequest() |
Instantiates a new Http request for the current platform | HttpModule.h | |
const TMap< FString, FString > & GetDefaultHeaders() |
Get the default headers that are appended to every request | HttpModule.h | |
float GetHttpActivityTimeout() |
HttpModule.h | ||
float GetHttpConnectionTimeout() |
HttpModule.h | ||
float GetHttpDelayTime() |
HttpModule.h | ||
float GetHttpEventLoopThreadTickIntervalInSeconds() |
HttpModule.h | ||
FHttpManager & GetHttpManager() |
Only meant to be used by Http request/response implementations | HttpModule.h | |
int32 GetHttpMaxConnectionsPerServer() |
HttpModule.h | ||
const FString & GetHttpNoProxy() |
HttpModule.h | ||
float GetHttpThreadActiveFrameTimeInSeconds() |
HttpModule.h | ||
float GetHttpThreadActiveMinimumSleepTimeInSeconds() |
HttpModule.h | ||
float GetHttpThreadIdleFrameTimeInSeconds() |
HttpModule.h | ||
float GetHttpThreadIdleMinimumSleepTimeInSeconds() |
HttpModule.h | ||
float GetHttpTotalTimeout() |
HttpModule.h | ||
int32 GetMaxReadBufferSize() |
HttpModule.h | ||
const FString & GetProxyAddress() |
HttpModule.h | ||
bool HandleHTTPCommand
(
const TCHAR* Cmd, |
Exec command handlers | HttpModule.h | |
bool IsHttpEnabled() |
HttpModule.h | ||
bool IsNullHttpEnabled() |
HttpModule.h | ||
void SetHttpDelayTime
(
float InHttpDelayTime |
Set the min delay time for each http request | HttpModule.h | |
void SetHttpThreadActiveFrameTimeInSeconds
(
float InHttpThreadActiveFrameTimeInSeconds |
Set the target tick rate of an active http thread | HttpModule.h | |
void SetHttpThreadActiveMinimumSleepTimeInSeconds
(
float InHttpThreadActiveMinimumSleepTimeInSeconds |
Set the minimum sleep time of an active http thread | HttpModule.h | |
void SetHttpThreadIdleFrameTimeInSeconds
(
float InHttpThreadIdleFrameTimeInSeconds |
Set the target tick rate of an idle http thread | HttpModule.h | |
void SetHttpThreadIdleMinimumSleepTimeInSeconds
(
float InHttpThreadIdleMinimumSleepTimeInSeconds |
Set the minimum sleep time when idle, waiting for requests | HttpModule.h | |
void SetMaxReadBufferSize
(
int32 SizeInBytes |
Sets the maximum size for the read buffer | HttpModule.h | |
void SetProxyAddress
(
const FString& InProxyAddress |
Setter for the proxy address. | HttpModule.h | |
bool SupportsDynamicProxy() |
Method to check dynamic proxy setting support. | HttpModule.h | |
void ToggleNullHttp
(
bool bEnabled |
Toggle null http implementation | HttpModule.h | |
void UpdateConfigs() |
Update all config-based values | HttpModule.h |
Overridden from IModuleInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostLoadCallback() |
Called after Http module is loaded Initialize platform specific parts of Http handling | HttpModule.h | |
virtual void PreUnloadCallback() |
Called before Http module is unloaded Shutdown platform specific parts of Http handling | HttpModule.h | |
virtual void ShutdownModule() |
Called when Http module is unloaded | HttpModule.h | |
virtual void StartupModule() |
Called when Http module is loaded load dependant modules | HttpModule.h |
Protected
Overridden from FExec
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Exec_Runtime
(
UWorld* InWorld, |
Handle exec commands starting with "HTTP" | HttpModule.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FHttpModule & Get () |
Singleton-like access to this module's interface. | HttpModule.h |