IHttpRequest

Interface for Http requests (created using FHttpFactory)

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

HTTP

Header

/Engine/Source/Runtime/Online/HTTP/Public/Interfaces/IHttpRequest.h

Include

#include "Interfaces/IHttpRequest.h"

Syntax

class IHttpRequest :
    public IHttpBase,
    public TSharedFromThis< IHttpRequest, ESPMode::ThreadSafe >

Remarks

Interface for Http requests (created using FHttpFactory)

Destructors

Name Description

Public function Virtual

~IHttpRequest()

Destructor for overrides

Functions

Name Description

Public function

void

 

AppendToHeader

(
    const FString& HeaderName,
    const FString& AdditionalHeaderVal...
)

Appends to the value already set in the header.

Public function

void

 

CancelRequest()

Called to cancel a request that is still being processed

Public function

void

 

ClearTimeout()

Clears the optional timeout in seconds for this HTTP request, causing the default value from FHttpModule::GetTimeout() to be used.

Public function Const

float

 

GetElapsedTime()

Gets the time that it took for the server to fully respond to the request.

Public function Const

const FHttpR...

 

GetResponse()

Get the associated Response

Public function Const

EHttpRequest...

 

GetStatus()

Get the current status of the request being processed

Public function Const

TOptional< f...

 

GetTimeout()

Gets the optional timeout in seconds for this entire HTTP request to complete.

Public function Const

FString

 

GetVerb()

Gets the verb (GET, PUT, POST) used by the request.

Public function

FHttpRequest...

 

OnHeaderReceived()

Delegate called to signal the receipt of a header. See FHttpRequestHeaderReceivedDelegate

Public function

FHttpRequest...

 

OnProcessRequestComplete()

Delegate called when the request is complete. See FHttpRequestCompleteDelegate

Public function

FHttpRequest...

 

OnRequestProgress()

Delegate called to update the request/response progress. See FHttpRequestProgressDelegate

Public function

FHttpRequest...

 

OnRequestWillRetry()

Delegate called when the request will be retried

Public function

bool

 

ProcessRequest()

Called to begin processing the request.

Public function

void

 

SetContent

(
    const TArray< uint8 >& ContentPayl...
)

Sets the content of the request (optional data). Usually only set for POST requests.

Public function

void

 

SetContent

(
    TArray< uint8 >&& ContentPayload
)

Sets the content of the request (optional data).

Public function

bool

 

SetContentAsStreamedFile

(
    const FString& Filename
)

Sets the content of the request to stream from a file.

Public function

void

 

SetContentAsString

(
    const FString& ContentString
)

Sets the content of the request as a string encoded as UTF8.

Public function

bool

 

SetContentFromStream

Sets the content of the request to stream directly from an archive.

Public function

void

 

SetHeader

(
    const FString& HeaderName,
    const FString& HeaderValue
)

Sets optional header info.

Public function

void

 

SetTimeout

(
    float InTimeoutSecs
)

Sets an optional timeout in seconds for this entire HTTP request to complete.

Public function

void

 

SetURL

(
    const FString& URL
)

Sets the URL for the request Eg.

Public function

void

 

SetVerb

(
    const FString& Verb
)

Sets the verb used by the request.

Public function

void

 

Tick

(
    float DeltaSeconds
)

Used to tick the request

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss