Skip to content

Backend API (HTTP / VaRest)

Overview

HTTP calls to the ModularInventory backend use VaRest (UVaRestRequestJSON) wrapped in UBaseAsyncAPITask (extends UCancellableAsyncAction). Concrete tasks implement OnRESTRequestComplete / OnRESTRequestFail and use shared JSON GET/POST/DELETE helpers with optional Bearer token injection. UMIPAPIUrlSubsystem stores the client access token after login flows; settings for base URLs live under MIPAPIUrlSettings.

All paths below are relative to Plugins/ModularInventoryPlus/Source/ModularInventoryPlus/.


Key Classes & Files

Class File
UBaseAsyncAPITask, FMIPBaseResponse Public/API/BaseAsyncAPITask.h
UMIPAPIUrlSubsystem Public/API/Subsystem/MIPAPIUrlSubsystem.h
UMIPAPIUrlSettings Public/API/Settings/MIPAPIUrlSettings.h
ULoginAsyncAPITask Public/API/LoginAsyncAPITask.h
URegisterAsyncAPITask Public/API/RegisterAsyncAPITask.h
UGetMeAsyncAPITask, UCreateFamilyAndCharacterAsyncAPITask, UCheckVersionAsyncAPITask Public/API/*.h
UMIPFrontendPopupManager Public/API/MIPFrontendPopupManager.h

UBaseAsyncAPITask

  • Activate: Must be called once from C++ after binding delegates (Blueprint auto-activates).
  • Protected API: CreateNewJsonGetRequest, CreateNewJsonPostRequest, CreateNewJsonDelRequest with InRequiredAccessToken; GetAuthToken() typically reads from UMIPAPIUrlSubsystem.
  • Hooks: DoOnSuccess / DoOnFailure with FMIPBaseResponse (message, code).

UMIPAPIUrlSubsystem

  • Base: UGameInstanceSubsystem; shouldCreateSubsystem gated as needed.
  • Static: Get(WorldContextObject), GetClientAuthToken — token set by friend ULoginAsyncAPITask / UCreateFamilyAndCharacterAsyncAPITask and UMIPBaseGameInstance.

Integration