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,CreateNewJsonDelRequestwithInRequiredAccessToken;GetAuthToken()typically reads fromUMIPAPIUrlSubsystem. - Hooks:
DoOnSuccess/DoOnFailurewithFMIPBaseResponse(message,code).
UMIPAPIUrlSubsystem¶
- Base:
UGameInstanceSubsystem;shouldCreateSubsystemgated as needed. - Static:
Get(WorldContextObject),GetClientAuthToken— token set by friendULoginAsyncAPITask/UCreateFamilyAndCharacterAsyncAPITaskandUMIPBaseGameInstance.
Integration¶
- Client Auth — login/register flows and socket hook-up.
- JWT — token verification for server join (separate from HTTP auth).
- Architecture: Auth & Join Flow — end-to-end flow.