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
-
OnComplete
public: FHTTPRequestActionEvent OnComplete;
Reflection-enabled
Specifiers:
- BlueprintAssignable
Event fired when the request completes successfully -
OnFail
public: 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
-
WorldContext
const UObject* WorldContext
-
URI
FString URI
URI 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
-
WorldContext
const UObject* WorldContext
-
URI
FString URI
URI to request
-
Payload
FString Payload
POST data to include
-
Headers
TMap<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
-
WorldContext
const UObject* WorldContext
-
URI
FString URI
URI to request
-
Verb
FString Verb
HTTP method, e.g.
GET
orPOST
-
Payload
FString Payload
(optional) additional payload to include with the request (depends on verb)
-
Headers
TMap<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
Authorization
header toBearer <AccessToken>
.
Arguments
-
WorldContext
const UObject* WorldContext
-
URI
FString URI
URI to request
-
Verb
FString Verb
HTTP method, e.g.
GET
orPOST
-
Payload
FString Payload
(optional) additional payload to include with the request (depends on verb)
-
AccessToken
FString AccessToken
Access token to use
-
Headers
TMap<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