Perspective session and localhost apis

I'm trying to track down how to (or if possible) to send a fetch to a local API source on the client computer running a Perspective session.

Our integration environment has many local web based APIs that are listening for data to be sent to them.

I have created a view with a button, I added and Event on the onClick action that is a script.

I use httpClient to send to http://localhost:5000/thisistheapi.

However this only processes on the GATEWAY and not from the client session. So the API on the client computer doesn't get the message.

It seems like this functionality should exist as there are other Actions that interact with the actual session, Refresh, Navigate, Request Print all execute on the Client session. Does anyone have a way to do a simple web fetch from a client session like this?

Generally not possible. Browsers consider such behavior to be a hacker trying to take control of the user's machine. And therefore go to great lengths to block it. (Along with all other local operations for the user's machine.)

If you really need such behavior, you need Vision, not Perspective.

Thank you for putting it that way, it never felt like how we were going about this was the best way to do it that makes much more sense.

A more in depth question then is can the Serial module be used with Perspective to send serial data over the clients session or is that module just for Vision?

Again, just for Vision.

If you use it with Perspective the serial connection needs to be on the Gateway.

So, no. That would be a local operation that browsers don't permit. There's some hope that Perspective Workstation will eventually be able to do serial ports.

Thank you all for responding so quickly and clearing up our misconceptions