integration_with_other_systems
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
integration_with_other_systems [2019/09/03 15:08] – emozolyak | integration_with_other_systems [2021/04/28 07:58] – [Example - connecting to a remote module via its web server] emozolyak | ||
---|---|---|---|
Line 54: | Line 54: | ||
</ | </ | ||
+ | ===== Implementing other requests like PUT ===== | ||
+ | |||
+ | To implement other requests, you can use special field in the cURL for the custom methods: | ||
+ | |||
+ | <code lua> | ||
+ | function main (userId) | ||
+ | |||
+ | INFO(" | ||
+ | |||
+ | str = '' | ||
+ | | ||
+ | c = cURL.easy_init() | ||
+ | c: | ||
+ | c: | ||
+ | c: | ||
+ | | ||
+ | c:setopt{ | ||
+ | [cURL.OPT_POSTFIELDS] = ' | ||
+ | } | ||
+ | c: | ||
+ | c: | ||
+ | c:close() | ||
+ | |||
+ | INFO(" | ||
+ | end | ||
+ | </ | ||
===== Example - connecting to a remote module via its web server ===== | ===== Example - connecting to a remote module via its web server ===== | ||
Line 74: | Line 100: | ||
{{ :: | {{ :: | ||
+ | |||
+ | ===== Notes on cURL usage ===== | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | In the fw of 4.0 version, the following issue was reported: | ||
+ | When there are multiple cURL requests from the WebHMI to the unavailable resource, a system crash may happen. The timeout settings won't affect the sysem behaviour. Use this feature with care when you need cyclical call of multiple cURLs in your scripts: | ||
+ | * use one script which detect availablity of the resource and locks following execution for a while | ||
+ | * use external watchdog circuit to reset WebHMI if you use it to control mission - critical system. | ||
+ | |||
+ | </ | ||
+ | |||
integration_with_other_systems.txt · Last modified: 2024/04/04 10:18 by emozolyak