![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IHttpRequest.h>
Inheritance diagram for IHttpRequest:Additional Inherited Members | |
Protected Member Functions inherited from TSharedFromThis< IHttpRequest, ESPMode::ThreadSafe > | |
| TSharedFromThis () | |
| TSharedFromThis (TSharedFromThis const &) | |
| UE_FORCEINLINE_HINT TSharedFromThis & | operator= (TSharedFromThis const &) |
| ~TSharedFromThis () | |
Static Protected Member Functions inherited from TSharedFromThis< IHttpRequest, ESPMode::ThreadSafe > | |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > | SharedThis (OtherType *ThisPtr) |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > | SharedThis (const OtherType *ThisPtr) |
Interface for Http requests (created using FHttpFactory)
|
virtualdefault |
Destructor for overrides
|
pure virtual |
Appends to the value already set in the header. If there is already content in that header, a comma delimiter is used. If the header is as of yet unset, the result is the same as calling SetHeader Content-Length is the only header set for you. Also see: SetHeader()
| HeaderName | - Name of the header (ie, Content-Type) |
| AdditionalHeaderValue | - Value to add to the existing contents of the specified header. comma is inserted between old value and new value, per HTTP specifications |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Called to cancel a request that is still being processed
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRetrySystem::FRequest.
Clears the optional timeout in seconds for this HTTP request, causing the default value from FHttpModule::GetTimeout() to be used.
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Get thread policy about which thread to complete this request
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Gets the time that it took for the server to fully respond to the request.
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Get the current value for the given option
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Get request priority, which is used to decide the position in the queue when max concurrent limit reached
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Get the associated Response
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Gets the optional timeout in seconds for this entire HTTP request to complete. If valid, this value overrides the default HTTP timeout set via FHttpModule::SetTimeout().
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Gets the verb (GET, PUT, POST) used by the request.
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Delegate called to signal the receipt of a header. See FHttpRequestHeaderReceivedDelegate
Implemented in FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestImpl.
|
pure virtual |
Delegate called when the request is complete. See FHttpRequestCompleteDelegate
Implemented in FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestImpl.
|
pure virtual |
Delegate called to update the request/response progress. See FHttpRequestProgressDelegate64
Implemented in FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestImpl.
|
pure virtual |
Delegate called when the request will be retried
Implemented in FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestImpl.
|
pure virtual |
Delegate called to signal the receipt of a header. See FHttpRequestStatusCodeReceivedDelegate
Implemented in FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestImpl.
Called to begin processing the request. OnProcessRequestComplete delegate is always called when the request completes or on error if it is bound. A request can be re-used but not while still being processed.
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRetrySystem::FRequest.
Blocking call to wait the request until it's completed
WARNINGS:
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Reset the elapsed timeout duration and flag, after the request completed and need to be reused
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Sets an optional activity timeout in seconds for this HTTP request. After connecting to web server, if there is no activity(send or receive) happen for this time period, it will trigger activity timeout If set, this value overrides the default HTTP activity timeout
| InTimeoutSecs | - Timeout for this HTTP request instance, in seconds |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Sets the content of the request (optional data). Usually only set for POST requests.
| ContentPayload | - payload to set. |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest, FHttpRequestAdapterBase, and FTransactionallySafeHttpRequest::FClosedHttpRequest.
Sets the content of the request (optional data). Usually only set for POST requests.
This version lets the API take ownership of the payload directly, helpful for larger payloads.
| ContentPayload | - payload to set. |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest, FHttpRequestAdapterBase, and FTransactionallySafeHttpRequest::FClosedHttpRequest.
Sets the content of the request to stream from a file.
| FileName | - filename from which to stream the body. |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Sets the content of the request as a string encoded as UTF8.
| ContentString | - payload to set. |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Sets the content of the request to stream directly from an archive. NOTE: The Stream->Serialize will be called from another thread other than the game thread
| Stream | - archive from which the payload should be streamed. |
Implemented in FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Set thread policy about which thread to trigger the delegates, set by FHttpManager::SetRequestCompletedDelegate, IHttpRequest::OnStatusCodeReceived, IHttpRequest::OnHeaderReceived, IHttpRequest::OnRequestProgress64 and IHttpRequest::OnProcessRequestComplete.
Note that when set it as CompleteOnHttpThread, the thread to trigger delegates could be any thread depends on the implementation. User code should make the delegate thread-safe and shouldn't assume it's triggered by the thread where this request get created.
| InThreadPolicy | - The thread policy to indicate which thread to trigger the delegates |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Sets optional header info. SetHeader for a given HeaderName will overwrite any previous values Use AppendToHeader to append more values for the same header Content-Length is the only header set for you. Required headers depends on the request itself. Eg. "multipart/form-data" needed for a form post
| HeaderName | - Name of the header (ie, Content-Type) |
| HeaderValue | - Value of the header |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Sets the given option for this Request Must be set before calling ProcessRequest.
| Option | - The option to set, see 'HttpRequestOptions' for supported options |
| OptionValue | - The value of the option to set |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Set priority of the request, which will be used to decide the position in the queue when max concurrent limit reached
| InHttpRequestPriority | - The priority to set |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
|
pure virtual |
Sets the stream to receive the response body. Make sure to handle the cleanup of stream when Serialize generated error(Stream->GetError returns true after Stream->Serialize call), this http request will fail and quit.
NOTE: Once set, the data will no longer be cached in response, IHttpResponse::GetContent() and IHttpResponse::GetContentAsString() will return empty result. The Stream->Serialize will be called from another thread other than the game thread
| Stream | - will be used to receive the response body |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
| bool IHttpRequest::SetResponseBodyReceiveStreamDelegateV2 | ( | FHttpRequestStreamDelegateV2 | StreamDelegate | ) |
Sets the delegate to receive the response body. Make sure to handle the cleanup of received data when failed to process the data(StreamDelegate return false), this http request will fail and quit.
NOTE: Once set, the data will no longer be cached in response, IHttpResponse::GetContent() and IHttpResponse::GetContentAsString() will return empty result. The delegate will be called from another thread other than the game thread
| StreamDelegate | - will be used to receive the response body |
Sets an optional timeout in seconds for this entire HTTP request to complete. If set, this value overrides the default HTTP timeout set via FHttpModule::SetTimeout().
| InTimeoutSecs | - Timeout for this HTTP request instance, in seconds |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Sets the URL for the request Eg. (http://my.domain.com/something.ext?key=value&key2=value). Must be set before calling ProcessRequest.
| URL | - URL to use. |
Implemented in FGenericPlatformHttpRequest, FHttpRequestCommon, FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, and FHttpRequestAdapterBase.
Sets the verb used by the request. Eg. (GET, PUT, POST) Should be set before calling ProcessRequest. If not specified then a GET is assumed.
| Verb | - verb to use. |
Implemented in FNullHttpRequest, FTransactionallySafeHttpRequest::FClosedHttpRequest, FTransactionallySafeHttpRequest, FAppleHttpRequest, FGenericPlatformHttpRequest, and FHttpRequestAdapterBase.
Used to tick the request
| DeltaSeconds | - seconds since last ticked |
Implemented in FAppleHttpRequest, FGenericPlatformHttpRequest, FNullHttpRequest, FTransactionallySafeHttpRequest, FHttpRequestAdapterBase, and FTransactionallySafeHttpRequest::FClosedHttpRequest.