Get a request via proxy

I want to send a GET request. PFC 750-8202 (eCOCKPIT). I understand how to make a request. I was given a proxy, ip and port. Can you tell me if there is such a configuration in the PLC or FB setup? Maybe you need to configure it via SSH somehow? Who has faced a similar task?

With HTTP Requests I always use Postman first to check is server working.
Then you can use WagoAppHttp library to create GET request

Thanks for the reply, but I’m interested in setting up a proxy so I can specify the ip address and port to request. I don’t see any settings for proxies. Maybe I’m looking in the wrong place.

On request proxy finds some functions, but it is not clear what to do with them and how to work.

Maybe you need to use the underlying WagoSysCurl library, but to be honest this look like an hard task.
And unfortunately the Web Client SL library doesn’t provide such a parameter either.

Have you tried to set up the proxy globally on Linux ?

export http_proxy=http://proxy_server_address:proxy_port/

Not sure whether it will work for the CODESYS program or only for the terminal.

No I haven’t tried, or rather I haven’t figured out where to set it up. Can you describe in more detail how to customize I will try. And I’ll write back to you afterward.

Log in to the controller shell, and first try to send this request using cURL.

  1. Download PuTTY ( Download PuTTY - a free SSH and telnet client for Windows) it is a SSH client, so we can connect do PLC console via SSH

  1. Login with root/wago

  1. Try to send some requests using cURL:

  2. If it’s working, you can call this using SysProcess library or create own script to call (SSH command from CoDeSys - #4 by WagoDamRud)

2 Likes

Thanks for the reply, I don’t have access at the moment but will have it soon. I tried the command line through a free proxy.
The response I saw was the following message.
2024-12-02_17-23-17

That’ll probably work, thanks! I’ll report back later.