PWR-HttpBridge icon

HttpBridge

Adds asynchronous HTTP request/response support to Unreal Blueprint logic mods

Last updated 7 months ago
Total downloads 862
Total rating 1 
Categories Libraries
Dependency string PWR-HttpBridge-1.1.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

Thunderstore-unreal_shimloader-1.0.6 icon
Thunderstore-unreal_shimloader

EXPERIMENTAL Thunderstore Mod Manager and r2modmanPlus support for RE-UE4SS and UE games.

Preferred version: 1.0.6

README

HttpBridgeMod

Adds asynchronous HTTP request/response support to Unreal Blueprint logic mods

Features

  • Supports GET, POST, PUT, DELETE and PATCH methods
  • Supports custom ip, path, port, headers and body
  • Timeout support
  • Requests are made from a HttpBridgeActor BP that you spawn into the game
  • Responses are broadcasted from an event dispatcher in HttpBridgeActor

Installing

Automatic (NOTE: Not currently working! Use Manual install instead!!)

Manual

Client:

  • Click Manual Download
  • Navigate to the root folder of the app (where Palworld.exe is located)... You can find this by right-clicking Palworld in Steam and navigating to Manage > Browse Local Files
  • Extract the contents of the mod folder into <PalworldRoot>\Pal\Binaries\Win64\Mods\HttpBridge (you will have to make a new folder named HttpBridge in Mods)
  • Extract the contents of the pak folder into <PalworldRoot>\Pal\Content\Paks\LogicMods

Server:

  • Click Manual Download
  • Navigate to the root folder of the app (where PalServer.exe is located)... You can find this by right-clicking Palworld Dedicated Server in Steam and navigating to Manage > Browse Local Files
  • Extract the contents of the mod folder into <PalworldRoot>\Pal\Binaries\Win64\Mods\HttpBridge (you will have to make a new folder named HttpBridge in Mods)
  • Extract the contents of the pak folder into <PalworldRoot>\Pal\Content\Paks\LogicMods

Devs

  • Copy the contents of the Sources\Mods folder to your Content\Mods folder
  • HttpBridge uses asset chunk ID 99. Please choose a different chunk ID for your other mods
  • Anywhere within your own mod, create a new BP variable of type HttpBridgeActor
  • Use a Spawn Actor from Class node with HttpBridgeActor as it's class, assigning your new variable to it
  • Bind an event delegate to HttpRequest using the Create Event node, and either Create Matching Function or Create Matching Event. This creates an HttpResponse callback function for HttpBridge to execute after an HTTP request
  • Make a new HttpRequest node, passing in your HttpBridgeActor variable and a valid FGuid (you can use the New Guid node)
  • Try to limit your mod to only having one HttpActor instance at a time, and only one request at a time until you recieve a response. Multiple simultaneous instances/requests have not yet been tested, so your mileage may vary if you try too many at once

Networking

  • If you wish to replicate from server to clients, you will need to open up Content\Mods\HttpBridge\HttpBridgeActor, click Class Defaults and set your desired replication variables, then compile and save.
  • Note that you might also require localcc's ReplicationEnabler mod for proper replication.
  • Best networking practice would be allow clients to make Run on Server RPC calls to the server, which in turn makes authoritative local (127.0.0.1 aka localhost) HTTP requests to your own backend application, and sends the relevant response data back through a Run on Client RPC call, however you may also make remote calls using any base domain (as the IP) and path, and HttpBridge will automatically resolve it into an IP for you

Reporting Bugs