URI Scheme Protocol
A custom uri scheme protocol is kinda like running a localhost REST API, but better since you’re not exposing the server to the security threats that come with hosting something on localhost, nor the port assignment annoyance.
Keep in mind that the protocol you register is only accessible within the apps webviews. It doesn’t get registered in the system and nothing outside the webview window it was registered with will be able to use it.