fbarresi / BeckhoffHttpClient

Unofficial TwinCAT function for HTTP-Client and Json conversion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Functionality question

twoway opened this issue · comments

Hi
I´m new to Beckhoff but not to automation.
The functionality i want to accomplish is quite simple and searching for the simplest way to do this without buying a license.
I have a INT variable in the PLC that i want to input to a http-address to post a form on a php-page
like this:
http://ipadress-to-remote-server/index.php?submit=1&MaxAmps=xxx
Where the XXX is my INT.

It's a very basic functionality.
Can I use this 'BeckhoffHttpClient' for this?
Or maybe there is a much simpler way to do it?

Hi,

I think you can use this package for your use case.
You should only clarify if the php page you are going to call can act 'like' an API.

The software use a general http client, so you could submit a request to your URL by calling the client with the right address and method (in your example seems to be GET).

A parsing of the reply is just possible with the json format, otherwise you whoud recognize a
successful call using the response code (200).

Let me know if you have any other questions. For more technical support please comment or paste here your code snippets.