UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FHttpModule Class Reference

#include <HttpModule.h>

+ Inheritance diagram for FHttpModule:

Public Member Functions

bool HandleHTTPCommand (const TCHAR *Cmd, FOutputDevice &Ar)
 
HTTP_API void UpdateConfigs ()
 
virtual HTTP_API TSharedRef< IHttpRequest, ESPMode::ThreadSafeCreateRequest ()
 
FHttpManagerGetHttpManager ()
 
float GetHttpTotalTimeout () const
 
float GetHttpConnectionTimeout () const
 
float GetHttpActivityTimeout () const
 
int32 GetHttpMaxConnectionsPerServer () const
 
int32 GetMaxReadBufferSize () const
 
void SetMaxReadBufferSize (int32 SizeInBytes)
 
bool IsHttpEnabled () const
 
void ToggleNullHttp (bool bEnabled)
 
bool IsNullHttpEnabled () const
 
float GetHttpDelayTime () const
 
void SetHttpDelayTime (float InHttpDelayTime)
 
float GetHttpThreadActiveFrameTimeInSeconds () const
 
void SetHttpThreadActiveFrameTimeInSeconds (float InHttpThreadActiveFrameTimeInSeconds)
 
float GetHttpThreadActiveMinimumSleepTimeInSeconds () const
 
void SetHttpThreadActiveMinimumSleepTimeInSeconds (float InHttpThreadActiveMinimumSleepTimeInSeconds)
 
float GetHttpThreadIdleFrameTimeInSeconds () const
 
void SetHttpThreadIdleFrameTimeInSeconds (float InHttpThreadIdleFrameTimeInSeconds)
 
float GetHttpThreadIdleMinimumSleepTimeInSeconds () const
 
void SetHttpThreadIdleMinimumSleepTimeInSeconds (float InHttpThreadIdleMinimumSleepTimeInSeconds)
 
float GetHttpEventLoopThreadTickIntervalInSeconds () const
 
const TMap< FString, FString > & GetDefaultHeaders () const
 
void AddDefaultHeader (const FString &HeaderName, const FString &HeaderValue)
 
const FString & GetProxyAddress () const
 
void SetProxyAddress (const FString &InProxyAddress)
 
const FString & GetHttpNoProxy () const
 
bool SupportsDynamicProxy () const
 
virtual HTTP_API void StartupModule () override
 
virtual HTTP_API void PostLoadCallback () override
 
virtual HTTP_API void PreUnloadCallback () override
 
virtual HTTP_API void ShutdownModule () override
 
- Public Member Functions inherited from IModuleInterface
virtual ~IModuleInterface ()
 
virtual bool SupportsDynamicReloading ()
 
virtual bool SupportsAutomaticShutdown ()
 
virtual bool IsGameModule () const
 
- Public Member Functions inherited from FSelfRegisteringExec
CORE_API FSelfRegisteringExec ()
 
virtual CORE_API ~FSelfRegisteringExec ()
 
- Public Member Functions inherited from FExec
virtual CORE_API ~FExec ()
 
virtual CORE_API bool Exec (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Static Public Member Functions

static HTTP_API FHttpModuleGet ()
 
- Static Public Member Functions inherited from FSelfRegisteringExec
static CORE_API bool StaticExec (UWorld *Inworld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Protected Member Functions

virtual HTTP_API bool Exec_Runtime (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar) override
 
- Protected Member Functions inherited from FExec
virtual bool Exec_Dev (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 
virtual bool Exec_Editor (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Protected Attributes

float HttpConnectionTimeout
 
float HttpTotalTimeout
 
float HttpActivityTimeout
 

Detailed Description

Module for Http request implementations Use FHttpFactory to create a new Http request

Member Function Documentation

◆ AddDefaultHeader()

void FHttpModule::AddDefaultHeader ( const FString &  HeaderName,
const FString &  HeaderValue 
)
inline

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

Parameters
HeaderName- Name of the header (e.g., "Content-Type")
HeaderValue- Value of the header

◆ CreateRequest()

TSharedRef< IHttpRequest, ESPMode::ThreadSafe > FHttpModule::CreateRequest ( )
virtual

Instantiates a new Http request for the current platform

Returns
new Http request instance

◆ Exec_Runtime()

bool FHttpModule::Exec_Runtime ( UWorld InWorld,
const TCHAR Cmd,
FOutputDevice Ar 
)
overrideprotectedvirtual

Handle exec commands starting with "HTTP"

Parameters
InWorldthe world context
Cmdthe exec command being executed
Arthe archive to log results to
Returns
true if the handler consumed the input, false to continue searching handlers

Reimplemented from FExec.

◆ Get()

FHttpModule & FHttpModule::Get ( )
static

Singleton-like access to this module's interface. This is just for convenience! Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.

Returns
Returns singleton instance, loading the module on demand if needed

◆ GetDefaultHeaders()

const TMap< FString, FString > & FHttpModule::GetDefaultHeaders ( ) const
inline

Get the default headers that are appended to every request

Returns
the default headers

◆ GetHttpActivityTimeout()

float FHttpModule::GetHttpActivityTimeout ( ) const
inline
Returns
timeout in seconds to check there is any ongoing activity on the established connection

◆ GetHttpConnectionTimeout()

float FHttpModule::GetHttpConnectionTimeout ( ) const
inline
Returns
timeout in seconds to establish the connection

◆ GetHttpDelayTime()

float FHttpModule::GetHttpDelayTime ( ) const
inline
Returns
min delay time for each http request

◆ GetHttpEventLoopThreadTickIntervalInSeconds()

float FHttpModule::GetHttpEventLoopThreadTickIntervalInSeconds ( ) const
inline
Returns
Duration between explicit tick calls when running an event loop http thread.

◆ GetHttpManager()

FHttpManager & FHttpModule::GetHttpManager ( )
inline

Only meant to be used by Http request/response implementations

Returns
Http request manager used by the module

◆ GetHttpMaxConnectionsPerServer()

int32 FHttpModule::GetHttpMaxConnectionsPerServer ( ) const
inline
Returns
max number of simultaneous connections to a specific server

◆ GetHttpNoProxy()

const FString & FHttpModule::GetHttpNoProxy ( ) const
inline
Returns
the domains which won't use proxy even if ProxyAddress is set

◆ GetHttpThreadActiveFrameTimeInSeconds()

float FHttpModule::GetHttpThreadActiveFrameTimeInSeconds ( ) const
inline
Returns
Target tick rate of an active http thread

◆ GetHttpThreadActiveMinimumSleepTimeInSeconds()

float FHttpModule::GetHttpThreadActiveMinimumSleepTimeInSeconds ( ) const
inline
Returns
Minimum sleep time of an active http thread

◆ GetHttpThreadIdleFrameTimeInSeconds()

float FHttpModule::GetHttpThreadIdleFrameTimeInSeconds ( ) const
inline
Returns
Target tick rate of an idle http thread

◆ GetHttpThreadIdleMinimumSleepTimeInSeconds()

float FHttpModule::GetHttpThreadIdleMinimumSleepTimeInSeconds ( ) const
inline
Returns
Minimum sleep time when idle, waiting for requests

◆ GetHttpTotalTimeout()

float FHttpModule::GetHttpTotalTimeout ( ) const
inline
Returns
total timeout in seconds for the entire http request to complete

◆ GetMaxReadBufferSize()

int32 FHttpModule::GetMaxReadBufferSize ( ) const
inline
Returns
max read buffer size for http requests

◆ GetProxyAddress()

const FString & FHttpModule::GetProxyAddress ( ) const
inline
Returns
The current proxy address.

◆ HandleHTTPCommand()

bool FHttpModule::HandleHTTPCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

Exec command handlers

◆ IsHttpEnabled()

bool FHttpModule::IsHttpEnabled ( ) const
inline
Returns
true if http requests are enabled

◆ IsNullHttpEnabled()

bool FHttpModule::IsNullHttpEnabled ( ) const
inline
Returns
true if null http is being used

◆ PostLoadCallback()

void FHttpModule::PostLoadCallback ( )
overridevirtual

Called after Http module is loaded Initialize platform specific parts of Http handling

Reimplemented from IModuleInterface.

◆ PreUnloadCallback()

void FHttpModule::PreUnloadCallback ( )
overridevirtual

Called before Http module is unloaded Shutdown platform specific parts of Http handling

Reimplemented from IModuleInterface.

◆ SetHttpDelayTime()

void FHttpModule::SetHttpDelayTime ( float  InHttpDelayTime)
inline

Set the min delay time for each http request

◆ SetHttpThreadActiveFrameTimeInSeconds()

void FHttpModule::SetHttpThreadActiveFrameTimeInSeconds ( float  InHttpThreadActiveFrameTimeInSeconds)
inline

Set the target tick rate of an active http thread

◆ SetHttpThreadActiveMinimumSleepTimeInSeconds()

void FHttpModule::SetHttpThreadActiveMinimumSleepTimeInSeconds ( float  InHttpThreadActiveMinimumSleepTimeInSeconds)
inline

Set the minimum sleep time of an active http thread

◆ SetHttpThreadIdleFrameTimeInSeconds()

void FHttpModule::SetHttpThreadIdleFrameTimeInSeconds ( float  InHttpThreadIdleFrameTimeInSeconds)
inline

Set the target tick rate of an idle http thread

◆ SetHttpThreadIdleMinimumSleepTimeInSeconds()

void FHttpModule::SetHttpThreadIdleMinimumSleepTimeInSeconds ( float  InHttpThreadIdleMinimumSleepTimeInSeconds)
inline

Set the minimum sleep time when idle, waiting for requests

◆ SetMaxReadBufferSize()

void FHttpModule::SetMaxReadBufferSize ( int32  SizeInBytes)
inline

Sets the maximum size for the read buffer

Parameters
SizeInBytesThe maximum number of bytes to use for the read buffer

◆ SetProxyAddress()

void FHttpModule::SetProxyAddress ( const FString &  InProxyAddress)
inline

Setter for the proxy address.

Parameters
InProxyAddress- New proxy address to use.

◆ ShutdownModule()

void FHttpModule::ShutdownModule ( )
overridevirtual

Called when Http module is unloaded

Reimplemented from IModuleInterface.

◆ StartupModule()

void FHttpModule::StartupModule ( )
overridevirtual

Called when Http module is loaded load dependant modules

Reimplemented from IModuleInterface.

◆ SupportsDynamicProxy()

bool FHttpModule::SupportsDynamicProxy ( ) const
inline

Method to check dynamic proxy setting support.

Returns
Whether this http implementation supports dynamic proxy setting.

◆ ToggleNullHttp()

void FHttpModule::ToggleNullHttp ( bool  bEnabled)
inline

toggle null http implementation

◆ UpdateConfigs()

void FHttpModule::UpdateConfigs ( )

Update all config-based values

Member Data Documentation

◆ HttpActivityTimeout

float FHttpModule::HttpActivityTimeout
protected

timeout in seconds to check there is any ongoing activity on the established connection

◆ HttpConnectionTimeout

float FHttpModule::HttpConnectionTimeout
protected

timeout in seconds to establish the connection

◆ HttpTotalTimeout

float FHttpModule::HttpTotalTimeout
protected

timeout in seconds for the entire http request to complete. 0 is no timeout


The documentation for this class was generated from the following files: