UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FHttpRouter Class Referencefinal

#include <HttpRouter.h>

+ Inheritance diagram for FHttpRouter:

Public Member Functions

bool Query (const TSharedPtr< FHttpServerRequest > &Request, const FHttpResultCallback &OnProcessingComplete) override
 
FHttpRouteHandle BindRoute (const FHttpPath &HttpPath, const EHttpServerRequestVerbs &RequestVerbs, const FHttpRequestHandler &Handler) override
 
void UnbindRoute (const FHttpRouteHandle &RouteHandle) override
 
FDelegateHandle RegisterRequestPreprocessor (FHttpRequestHandler RequestPreprocessor) override
 
void UnregisterRequestPreprocessor (const FDelegateHandle &RequestPreprocessorHandle) override
 
FHttpRequestHandlerIterator CreateRequestHandlerIterator (const TSharedPtr< FHttpServerRequest > &Request) const
 
- Public Member Functions inherited from TSharedFromThis< IHttpRouter >
TSharedRef< IHttpRouter, Mode > AsShared ()
 
TSharedRef< IHttpRouter const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< IHttpRouter, Mode > AsWeak ()
 
TWeakPtr< IHttpRouter const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Additional Inherited Members

- Protected Member Functions inherited from IHttpRouter
virtual ~IHttpRouter ()
 
- Protected Member Functions inherited from TSharedFromThis< IHttpRouter >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< IHttpRouter >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Member Function Documentation

◆ BindRoute()

FHttpRouteHandle FHttpRouter::BindRoute ( const FHttpPath HttpPath,
const EHttpServerRequestVerbs HttpVerbs,
const FHttpRequestHandler Handler 
)
overridevirtual

Binds the caller-supplied Uri to the caller-supplied handler

Parameters
HttpPathThe respective http path to bind
HttpVerbsThe respective HTTP verbs to bind
HandlerThe caller-defined closure to execute when the binding is invoked
Returns
An FHttpRouteHandle on success, nullptr otherwise.

Implements IHttpRouter.

◆ CreateRequestHandlerIterator()

FHttpRequestHandlerIterator FHttpRouter::CreateRequestHandlerIterator ( const TSharedPtr< FHttpServerRequest > &  Request) const

Creates a request handler iterator to facilitate http routing

Parameters
RequestThe basis request for which matching request handlers are found
Returns
The instantiated FHttpRequestHandlerIterator

◆ Query()

bool FHttpRouter::Query ( const TSharedPtr< FHttpServerRequest > &  Request,
const FHttpResultCallback OnProcessingComplete 
)
overridevirtual

Query the router with a request.

Parameters
Requestthe request to route.
OnCompletethe callback called when
Returns
An FHttpRouteHandle on success, nullptr otherwise.

Implements IHttpRouter.

◆ RegisterRequestPreprocessor()

FDelegateHandle FHttpRouter::RegisterRequestPreprocessor ( FHttpRequestHandler  RequestPreprocessor)
overridevirtual

Register a request preprocessor. Useful for cases where you want to drop or handle incoming requests before they are dispatched to their respective handler.

Parameters
RequestPreprocessorThe function called to process the incoming request.
Returns
FDelegateHandle The handle to the delegate, used for unregistering preprocessors.

Implements IHttpRouter.

◆ UnbindRoute()

void FHttpRouter::UnbindRoute ( const FHttpRouteHandle RouteHandle)
overridevirtual

Unbinds the caller-supplied Route

Parameters
RouteHandleThe handle to the route to unbind (callers must retain from BindRoute)

Implements IHttpRouter.

◆ UnregisterRequestPreprocessor()

void FHttpRouter::UnregisterRequestPreprocessor ( const FDelegateHandle RequestPreprocessorHandle)
overridevirtual

Unregister a request preprocessor.

Parameters
RequestPreprocessorHandleThe handle to the preprocessor delegate to unregister.

Implements IHttpRouter.


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