Http get

Hi, What’s the easier way to send an HTTP GET from PLC Next to a PC? Is there a “native” way to implement the HTTP Get, so, without using Node Red . I look in the IT Library and there isn’t yet this functionality, I know there are a curl library installed on plc next, but i didn’t found an easy way to use it. Ciao Samuele

Hello, this will be a feature of PLCnextBase 1.3 library which is planned for may 2020. Kind regards

Alternatively, you could check out this PLCnext Store app: https://www.plcnextstore.com/#/506 … but for a simple HTTP GET, that seems like a 60MB sledghammer to crack a kilobyte-sized nut. ~ Martin.

Hi Samuele, there are many alternatives. You can also go for Python and use the requests packet.

This one is quite easy to use and well documented. Take care Frank

Thanks to all for the replies. I think the most usefull features will be the new PLCNext Base 1.3 Library. The other way are not “native” solution or easy to implement, but it depends wich skill you customer have. What about c++ libcurl implemented in the /usr/local/lib of PLCNext? I have to use only the right .h file inside my c++ application? Ciao Samuele

Hi Samuele, If you are writing your own C++ Component, then you could use libcurl - which is already included in the firmware - or you could use the boost libraries, something like: https://www.boost.org/doc/libs/1_66_0/libs/beast/example/http/client/sync/http_client_sync.cpp Note that a synchronous http call is likely to take some time to complete, so you should not do this from within the main thread of a real-time C++ Program, otherwise you are likely to trigger the task watchdog. ~ Martin.