-
Notifications
You must be signed in to change notification settings - Fork 0
UGMPJsonHttpUtils
The HTTP NeuronAction GMP ships. Also the reference example of what a UK2NeuronAction looks like in source.
Declared in Plugins/GMP/Source/GMP/Private/GMPJsonUtils.h:60
DECLARE_DYNAMIC_DELEGATE_TwoParams(FGMPJsonResponseDelegate, bool, bSucc, int32, RspCode);
UCLASS(meta = (NeuronAction))
class UGMPJsonHttpUtils : public UBlueprintFunctionLibrary
{
UFUNCTION(BlueprintCallable, CustomThunk, BlueprintInternalUseOnly,
Category = "GMP|Json|HTTP",
meta = (DisplayName = "GMPHttpPostRequest", NeuronAction, WorldContext = InCtx,
CustomStructureParam = "RequestStruct,ResponseStruct",
TimeoutSecs = "60", AutoCreateRefTerm = "Headers",
AdvancedDisplay = "Headers,TimeoutSecs"))
static void HttpPostRequestWild(const UObject* InCtx, const FString& Url,
const TMap<FString, FString>& Headers, float TimeoutSecs,
const FGMPJsonResponseDelegate& OnHttpResponse,
int32 ConvertFlags,
const int32& RequestStruct, int32& ResponseStruct);
};HttpGetRequestWild is the same shape without a request body.

| Pin | From |
|---|---|
Url, Convert Flags
|
ordinary parameters |
Request Struct, Response Struct
|
CustomStructureParam — wildcards, typed by whatever you connect |
Headers, Timeout Secs
|
AdvancedDisplay, collapsed by default |
On Http Response + bSucc, RspCode
|
the delegate parameter, expanded into an exec pin with its data |
ResponseStruct is a ref parameter. The implementation deserialises the response JSON into your struct
and only then executes the delegate, so downstream of the exec pin the data is already there. No parsing
node, and no proxy object to keep alive.
EEJsonEncodeMode is a bitmask controlling JSON encoding of the request: BoolAsBoolean, EnumAsStr,
Int64AsStr, UInt64AsStr, OverflowAsStr, LowerStartCase, StandardizeID. The Int64AsStr and
UInt64AsStr flags exist because JSON numbers cannot represent the full 64-bit range — set them when
talking to a service that expects string-encoded ids.
The template form takes typed request and response structs directly:
template<typename TReq, typename TRsp>
static void HttpPostRequestWild(const UObject* InCtx, const FString& Url,
const TMap<FString, FString>& Headers, const TReq& Req,
TDelegate<void(bool, int32, const TRsp&)> Rsp,
float TimeoutSecs = 60.f,
EEJsonEncodeMode ConvertFlags = EEJsonEncodeMode::Default);GMP · Reference wiki — one page per named thing. Guided introduction: project site · 中文站点 · measured dispatch stack Source: repository · README · README 中文
Pages here are generated from wiki/ in the main repository — edit there, not on the wiki.
Concepts
- Why a string key
- Dispatch layers
- Parameter compatibility
- Signature inference
- Key baking
- Transparent rewrite
- Jump tracing
Sending and listening
- NotifyMessage family
- ListenMessage family
- StoreObjectMessage
- MSGKEY
- FSigSource
- FSigHandle
- FGMPKey
- FGMPResponder
Dispatch internals
Reflection and data
Editor
Build