![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TransactionallySafeHttpRequest.h>
Inheritance diagram for FTransactionallySafeHttpRequest:Classes | |
| class | FClosedHttpRequest |
Friends | |
| class | FClosedHttpRequest |
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) |
Wraps a FPlatformHttp request when one is created inside an AutoRTFM transaction. Basic getters and setters are cached and played back when the transaction succeeds. Once the transaction is committed, a real HttpRequest is instantiated and all calls are passed through as-is.
| FTransactionallySafeHttpRequest::FTransactionallySafeHttpRequest | ( | ) |
|
virtualdefault |
|
overridevirtual |
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 |
Implements IHttpRequest.
|
overridevirtual |
Called to cancel a request that is still being processed
Implements IHttpRequest.
|
overridevirtual |
Clears the optional timeout in seconds for this HTTP request, causing the default value from FHttpModule::GetTimeout() to be used.
Implements IHttpRequest.
|
overridevirtual |
Return all headers in an array in "Name: Value" format.
Implements IHttpBase.
Get the content payload of the request or response.
| Content | - array that will be filled with the content. |
Implements IHttpBase.
|
overridevirtual |
Shortcut to get the Content-Length header value. Will not always return non-zero. If you want the real length of the payload, get the payload and check it's length.
Implements IHttpBase.
|
overridevirtual |
Shortcut to get the Content-Type header value (if available)
Implements IHttpBase.
|
overridevirtual |
Get thread policy about which thread to complete this request
Implements IHttpRequest.
|
overridevirtual |
Get the effective URL in case of redirected. If not redirected, it's the same as GetURL
Implements IHttpBase.
|
overridevirtual |
Gets the time that it took for the server to fully respond to the request.
Implements IHttpRequest.
|
overridevirtual |
Get the reason of th failure if GetStatus returns Failed
Implements IHttpBase.
|
overridevirtual |
Gets the value of a header, or empty string if not found.
| HeaderName | - name of the header to set. |
Implements IHttpBase.
|
overridevirtual |
Get the current value for the given option
Implements IHttpRequest.
|
overridevirtual |
Get request priority, which is used to decide the position in the queue when max concurrent limit reached
Implements IHttpRequest.
|
overridevirtual |
|
overridevirtual |
Get the current status of the request being processed
Implements IHttpBase.
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().
Implements IHttpRequest.
|
overridevirtual |
|
overridevirtual |
Gets an URL parameter. expected format is ?Key=Value&Key=Value... If that format is not used, this function will not work.
| ParameterName | - the parameter to request. |
Implements IHttpBase.
|
overridevirtual |
|
overridevirtual |
Delegate called to signal the receipt of a header. See FHttpRequestHeaderReceivedDelegate
Implements IHttpRequest.
|
overridevirtual |
Delegate called when the request is complete. See FHttpRequestCompleteDelegate
Implements IHttpRequest.
|
overridevirtual |
Delegate called to update the request/response progress. See FHttpRequestProgressDelegate64
Implements IHttpRequest.
|
overridevirtual |
Delegate called when the request will be retried
Implements IHttpRequest.
|
overridevirtual |
Delegate called to signal the receipt of a header. See FHttpRequestStatusCodeReceivedDelegate
Implements IHttpRequest.
|
overridevirtual |
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.
Implements IHttpRequest.
|
overridevirtual |
Blocking call to wait the request until it's completed
WARNINGS:
Implements IHttpRequest.
|
overridevirtual |
Reset the elapsed timeout duration and flag, after the request completed and need to be reused
Implements IHttpRequest.
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 |
Implements IHttpRequest.
|
overridevirtual |
Sets the content of the request (optional data). Usually only set for POST requests.
| ContentPayload | - payload to set. |
Implements IHttpRequest.
|
overridevirtual |
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. |
Implements IHttpRequest.
|
overridevirtual |
Sets the content of the request to stream from a file.
| FileName | - filename from which to stream the body. |
Implements IHttpRequest.
|
overridevirtual |
Sets the content of the request as a string encoded as UTF8.
| ContentString | - payload to set. |
Implements IHttpRequest.
|
overridevirtual |
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. |
Implements IHttpRequest.
|
overridevirtual |
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 |
Implements IHttpRequest.
|
overridevirtual |
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 |
Implements IHttpRequest.
|
overridevirtual |
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 |
Implements IHttpRequest.
|
overridevirtual |
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 |
Implements IHttpRequest.
|
overridevirtual |
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 |
Implements IHttpRequest.
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 |
Implements IHttpRequest.
|
overridevirtual |
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. |
Implements IHttpRequest.
|
overridevirtual |
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. |
Implements IHttpRequest.
Used to tick the request
| DeltaSeconds | - seconds since last ticked |
Implements IHttpRequest.
|
friend |