UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FHttpServerResponse Struct Referencefinal

#include <HttpServerResponse.h>

Public Member Functions

 FHttpServerResponse ()
 
 FHttpServerResponse (TArray< uint8 > &&InBody)
 

Static Public Member Functions

static HTTPSERVER_API TUniquePtr< FHttpServerResponseCreate (const FString &Text, const FString &ContentType)
 
static HTTPSERVER_API TUniquePtr< FHttpServerResponseCreate (const FUtf8String &Text, const FString &ContentType)
 
static HTTPSERVER_API TUniquePtr< FHttpServerResponseCreate (FUtf8String &&Text, const FString &ContentType)
 
static HTTPSERVER_API TUniquePtr< FHttpServerResponseCreate (TArray< uint8 > &&RawBytes, FString ContentType)
 
static HTTPSERVER_API TUniquePtr< FHttpServerResponseCreate (const TArrayView< uint8 > &RawBytes, FString ContentType)
 
static HTTPSERVER_API TUniquePtr< FHttpServerResponseOk ()
 
static HTTPSERVER_API TUniquePtr< FHttpServerResponseError (EHttpServerResponseCodes ResponseCode, const FString &ErrorCode=TEXT(""), const FString &ErrorMessage=TEXT(""))
 

Public Attributes

HttpVersion::EHttpServerHttpVersion HttpVersion
 
EHttpServerResponseCodes Code
 
TMap< FString, TArray< FString > > Headers
 
TArray< uint8Body
 

Constructor & Destructor Documentation

◆ FHttpServerResponse() [1/2]

FHttpServerResponse::FHttpServerResponse ( )
inline

Constructor

◆ FHttpServerResponse() [2/2]

FHttpServerResponse::FHttpServerResponse ( TArray< uint8 > &&  InBody)
inline

Constructor Facilitates in-place body construction

Parameters
InBodyThe r-value body data

Member Function Documentation

◆ Create() [1/5]

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Create ( const FString &  Text,
const FString &  ContentType 
)
static

Creates an FHttpServerResponse from a string

Parameters
TextThe text to serialize
ContentTypeThe HTTP response content type
Returns
A unique pointer to an initialized response object

◆ Create() [2/5]

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Create ( const FUtf8String Text,
const FString &  ContentType 
)
static

Creates an FHttpServerResponse from a string

Parameters
TextThe text to serialize
ContentTypeThe HTTP response content type
Returns
A unique pointer to an initialized response object

◆ Create() [3/5]

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Create ( const TArrayView< uint8 > &  RawBytes,
FString  ContentType 
)
static

Creates an FHttpServerResponse from a raw byte buffer

Parameters
RawBytesThe byte buffer view to serialize
ContentTypeThe HTTP response content type
Returns
A unique pointer to an initialized response object

◆ Create() [4/5]

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Create ( FUtf8String &&  Text,
const FString &  ContentType 
)
static

Creates an FHttpServerResponse from a string

Parameters
TextThe text to serialize
ContentTypeThe HTTP response content type
Returns
A unique pointer to an initialized response object

◆ Create() [5/5]

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Create ( TArray< uint8 > &&  RawBytes,
FString  ContentType 
)
static

Creates an FHttpServerResponse from a raw byte buffer

Parameters
RawBytesThe byte buffer to serialize
ContentTypeThe HTTP response content type
Returns
A unique pointer to an initialized response object

◆ Error()

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Error ( EHttpServerResponseCodes  ResponseCode,
const FString &  ErrorCode = TEXT(""),
const FString &  ErrorMessage = TEXT("") 
)
static

Creates an FHttpServerResponse with the caller-supplied response and error codes

Parameters
ResponseCodeThe HTTP response code
ErrorCodeThe machine-readable error code
ErrorMessageThe contextually descriptive error message
Returns
A unique pointer to an initialized response object

◆ Ok()

TUniquePtr< FHttpServerResponse > FHttpServerResponse::Ok ( )
static

Creates an FHttpServerResponse 204

Returns
A unique pointer to an initialized response object

Member Data Documentation

◆ Body

TArray<uint8> FHttpServerResponse::Body

Http Body Content

◆ Code

EHttpServerResponseCodes FHttpServerResponse::Code

Http Response Code

◆ Headers

TMap<FString, TArray<FString> > FHttpServerResponse::Headers

Http Headers

◆ HttpVersion

HttpVersion::EHttpServerHttpVersion FHttpServerResponse::HttpVersion

Http protocol version


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