Navigation
API > API/Runtime > API/Runtime/HTTP
Interface for Http requests (created using FHttpFactory)
| Name | IHttpRequest |
| Type | class |
| Header File | /Engine/Source/Runtime/Online/HTTP/Public/Interfaces/IHttpRequest.h |
| Include Path | #include "Interfaces/IHttpRequest.h" |
Syntax
class IHttpRequest :
public IHttpBase ,
public TSharedFromThis< IHttpRequest, ESPMode::ThreadSafe >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → IHttpRequest
Implements Interfaces
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IHttpRequest() |
Destructor for overrides | Interfaces/IHttpRequest.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendToHeader
(
const FString& HeaderName, |
Appends to the value already set in the header. | Interfaces/IHttpRequest.h | |
void CancelRequest() |
Called to cancel a request that is still being processed | Interfaces/IHttpRequest.h | |
void ClearTimeout() |
Clears the optional timeout in seconds for this HTTP request, causing the default value from FHttpModule::GetTimeout() to be used. | Interfaces/IHttpRequest.h | |
EHttpRequestDelegateThreadPolicy GetDelegateThreadPolicy() |
Get thread policy about which thread to complete this request | Interfaces/IHttpRequest.h | |
float GetElapsedTime() |
Gets the time that it took for the server to fully respond to the request. | Interfaces/IHttpRequest.h | |
FString GetOption
(
const FName Option |
Get the current value for the given option | Interfaces/IHttpRequest.h | |
const FHttpResponsePtr GetResponse() |
Get the associated Response | Interfaces/IHttpRequest.h | |
TOptional< float > GetTimeout () |
Gets the optional timeout in seconds for this entire HTTP request to complete. | Interfaces/IHttpRequest.h | |
FString GetVerb() |
Gets the verb (GET, PUT, POST) used by the request. | Interfaces/IHttpRequest.h | |
FHttpRequestHeaderReceivedDelegate & OnHeaderReceived() |
Delegate called to signal the receipt of a header. See FHttpRequestHeaderReceivedDelegate | Interfaces/IHttpRequest.h | |
FHttpRequestCompleteDelegate & OnProcessRequestComplete() |
Delegate called when the request is complete. See FHttpRequestCompleteDelegate | Interfaces/IHttpRequest.h | |
FHttpRequestProgressDelegate64 & OnRequestProgress64() |
Delegate called to update the request/response progress. See FHttpRequestProgressDelegate64 | Interfaces/IHttpRequest.h | |
FHttpRequestWillRetryDelegate & OnRequestWillRetry() |
Delegate called when the request will be retried | Interfaces/IHttpRequest.h | |
FHttpRequestStatusCodeReceivedDelegate & OnStatusCodeReceived() |
Delegate called to signal the receipt of a header. See FHttpRequestStatusCodeReceivedDelegate | Interfaces/IHttpRequest.h | |
bool ProcessRequest () |
Called to begin processing the request. | Interfaces/IHttpRequest.h | |
void ProcessRequestUntilComplete () |
Blocking call to wait the request until it's completed | Interfaces/IHttpRequest.h | |
void ResetTimeoutStatus() |
Reset the elapsed timeout duration and flag, after the request completed and need to be reused | Interfaces/IHttpRequest.h | |
void SetActivityTimeout
(
float InTimeoutSecs |
Sets an optional activity timeout in seconds for this HTTP request. | Interfaces/IHttpRequest.h | |
void SetContent
(
const TArray< uint8 >& ContentPayload |
Sets the content of the request (optional data). Usually only set for POST requests. | Interfaces/IHttpRequest.h | |
void SetContent
(
TArray< uint8 >&& ContentPayload |
Sets the content of the request (optional data). | Interfaces/IHttpRequest.h | |
bool SetContentAsStreamedFile
(
const FString& Filename |
Sets the content of the request to stream from a file. | Interfaces/IHttpRequest.h | |
void SetContentAsString
(
const FString& ContentString |
Sets the content of the request as a string encoded as UTF8. | Interfaces/IHttpRequest.h | |
bool SetContentFromStream
(
TSharedRef< FArchive, ESPMode::ThreadSafe > Stream |
Sets the content of the request to stream directly from an archive. | Interfaces/IHttpRequest.h | |
bool SetContentFromStreamDelegate
(
FHttpRequestStreamDelegate StreamDelegate |
Sets the content of the request to stream directly from an delegate. | Interfaces/IHttpRequest.h | |
void SetDelegateThreadPolicy
(
EHttpRequestDelegateThreadPolicy InThreadPolicy |
Set thread policy about which thread to trigger the delegates, set by FHttpManager::SetRequestCompletedDelegate, IHttpRequest::OnStatusCodeReceived, IHttpRequest::OnHeaderReceived, IHttpRequest::OnRequestProgress64 and IHttpRequest::OnProcessRequestComplete. | Interfaces/IHttpRequest.h | |
void SetHeader
(
const FString& HeaderName, |
Sets optional header info. | Interfaces/IHttpRequest.h | |
void SetOption
(
const FName Option, |
Sets the given option for this Request Must be set before calling ProcessRequest. | Interfaces/IHttpRequest.h | |
bool SetResponseBodyReceiveStream
(
TSharedRef< FArchive > Stream |
Sets the stream to receive the response body. | Interfaces/IHttpRequest.h | |
bool SetResponseBodyReceiveStreamDelegate
(
FHttpRequestStreamDelegate StreamDelegate |
Sets the delegate to receive the response body. | Interfaces/IHttpRequest.h | |
bool SetResponseBodyReceiveStreamDelegateV2
(
FHttpRequestStreamDelegateV2 StreamDelegate |
Sets the delegate to receive the response body. | Interfaces/IHttpRequest.h | |
void SetTimeout
(
float InTimeoutSecs |
Sets an optional timeout in seconds for this entire HTTP request to complete. | Interfaces/IHttpRequest.h | |
void SetURL
(
const FString& URL |
Sets the URL for the request Eg. | Interfaces/IHttpRequest.h | |
void SetVerb
(
const FString& Verb |
Sets the verb used by the request. | Interfaces/IHttpRequest.h | |
void Tick
(
float DeltaSeconds |
Used to tick the request | Interfaces/IHttpRequest.h |