Class: UHTTPRequestAction
// HTTPRequestAction.h : 13
class NBPATREONAPICLIENT_API UHTTPRequestAction
: public UCancellableAsyncAction;
Reflection-enabled
Helper to make common HTTP requests a little easier and expose them to blueprints.
Properties
-
OnCompletepublic: FHTTPRequestActionEvent OnComplete;
Reflection-enabled
Specifiers:
- BlueprintAssignable
Event fired when the request completes successfully -
OnFailpublic: FHTTPRequestActionEvent OnFail;
Reflection-enabled
Specifiers:
- BlueprintAssignable
Event fired if the request fails for any reason
Methods
-
Activate// HTTPRequestAction.h : 81 public: virtual void Activate() override;Starts the task
-
Cancel// HTTPRequestAction.h : 86 public: virtual void Cancel() override;Can be called to cancel the task and prevent callbacks from being called
-
HTTPGetAsyncAction// HTTPRequestAction.h : 52 public: static UHTTPRequestAction* HTTPGetAsyncAction( const UObject* WorldContext, FString URI );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBPatreonAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP GET
- Keywords = NBPatreonAPIClient
- WorldContext = WorldContext
- BlueprintInternalUseOnly = true
HTTP GET Request
Arguments
-
WorldContextconst UObject* WorldContext -
URIFString URIURI to request
Returns
-
UHTTPRequestAction*
-
HTTPPostAsyncAction// HTTPRequestAction.h : 63 public: static UHTTPRequestAction* HTTPPostAsyncAction( const UObject* WorldContext, FString URI, FString Payload, TMap<FString, FString> Headers );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBPatreonAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP POST
- Keywords = NBPatreonAPIClient
- WorldContext = WorldContext
- BlueprintInternalUseOnly = true
HTTP POST Request
Arguments
-
WorldContextconst UObject* WorldContext -
URIFString URIURI to request
-
PayloadFString PayloadPOST data to include
-
HeadersTMap<FString, FString> Headers(optional) Custom headers to include with request
Returns
-
UHTTPRequestAction*
-
HTTPRequestAsyncAction// HTTPRequestAction.h : 28 public: static UHTTPRequestAction* HTTPRequestAsyncAction( const UObject* WorldContext, FString URI, FString Verb, FString Payload, TMap<FString, FString> Headers );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBPatreonAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP Request
- Keywords = NBPatreonAPIClient
- WorldContext = WorldContext
- BlueprintInternalUseOnly = true
Generic HTTP request
Arguments
-
WorldContextconst UObject* WorldContext -
URIFString URIURI to request
-
VerbFString VerbHTTP method, e.g.
GETorPOST -
PayloadFString Payload(optional) additional payload to include with the request (depends on verb)
-
HeadersTMap<FString, FString> Headers(optional) Custom headers to include with request
Returns
-
UHTTPRequestAction*
-
HTTPRequestWithTokenAsyncAction// HTTPRequestAction.h : 43 public: static UHTTPRequestAction* HTTPRequestWithTokenAsyncAction( const UObject* WorldContext, FString URI, FString Verb, FString Payload, FString AccessToken, TMap<FString, FString> Headers );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBPatreonAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP Request (with bearer token)
- Keywords = NBPatreonAPIClient
- WorldContext = WorldContext
- BlueprintInternalUseOnly = true
HTTP Request with a bearer token.
This will automatically set the
Authorizationheader toBearer <AccessToken>.
Arguments
-
WorldContextconst UObject* WorldContext -
URIFString URIURI to request
-
VerbFString VerbHTTP method, e.g.
GETorPOST -
PayloadFString Payload(optional) additional payload to include with the request (depends on verb)
-
AccessTokenFString AccessTokenAccess token to use
-
HeadersTMap<FString, FString> Headers(optional) Custom headers to include with request
Returns
-
UHTTPRequestAction*
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com