Class: UNBSSHTTPRequestAction
// NBSSHTTPRequestAction.h : 15
class NBSUBSCRIBESTARAPICLIENT_API UNBSSHTTPRequestAction
: public UCancellableAsyncAction;
Reflection-enabled
Helper to make common HTTP requests a little easier and expose them to blueprints.
Properties
-
OnComplete
public: FNBSSHTTPRequestActionEvent OnComplete;
Reflection-enabled
Specifiers:
- BlueprintAssignable
Event fired when the request completes successfully -
OnFail
public: FNBSSHTTPRequestActionEvent OnFail;
Reflection-enabled
Specifiers:
- BlueprintAssignable
Event fired if the request fails for any reason
Methods
-
Activate
// NBSSHTTPRequestAction.h : 84 public: virtual void Activate() override;
Starts the task
-
Cancel
// NBSSHTTPRequestAction.h : 89 public: virtual void Cancel() override;
Can be called to cancel the task and prevent callbacks from being invoked
-
HTTPGetAction
// NBSSHTTPRequestAction.h : 55 public: static UNBSSHTTPRequestAction* HTTPGetAction( const UObject* WorldContext, FString URI );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBSubscribeStarAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP GET
- Keywords = SubscribeStar HTTP
- WorldContext = WorldContext
- BlueprintInternalUseOnly = true
HTTP GET Request
Arguments
-
WorldContext
const UObject* WorldContext
-
URI
FString URI
URI to request
Returns
-
UNBSSHTTPRequestAction*
-
HTTPPostAction
// NBSSHTTPRequestAction.h : 66 public: static UNBSSHTTPRequestAction* HTTPPostAction( const UObject* WorldContext, FString URI, FString Payload, TMap<FString, FString> Headers );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBSubscribeStarAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP POST
- Keywords = SubscribeStar HTTP
- 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
-
UNBSSHTTPRequestAction*
-
HTTPRequestAction
// NBSSHTTPRequestAction.h : 31 public: static UNBSSHTTPRequestAction* HTTPRequestAction( const UObject* WorldContext, FString URI, FString Verb, FString Payload, TMap<FString, FString> Headers );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBSubscribeStarAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP Request
- Keywords = SubscribeStar HTTP
- 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
-
UNBSSHTTPRequestAction*
-
HTTPRequestWithTokenAction
// NBSSHTTPRequestAction.h : 46 public: static UNBSSHTTPRequestAction* HTTPRequestWithTokenAction( const UObject* WorldContext, FString URI, FString Verb, FString Payload, FString AccessToken, TMap<FString, FString> Headers );
Reflection-enabled
Specifiers:
- BlueprintCallable
- Category = NBSubscribeStarAPIClient|HTTP
Meta Specifiers:
- DisplayName = HTTP Request (with bearer token)
- Keywords = SubscribeStar HTTP
- 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
-
UNBSSHTTPRequestAction*
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com