Custom lua function call in lua services defined in templates of lua resource of EMS
Hi,
I have below lua script which is calling external REST API.
local https = require("ssl.https")
local one, code, headers, status = https.request{
method = "POST",
url = "https://<ip>:<port>/<service_path>"
headers = {
["Content-Type"] = "application/json"
}
}
This script is working fine independently.
Now I want to integrate with the edge device on EMS. This script should be executed by the remote service defined on edge device in template file of lua resource in EMS.
I tried integrating the script in the lua files of thingworx. But, whenever I add the very first line "local https = require("ssl.https")", remote properties and services are not visible on Thingworx remote thing.
Can anyone guide me how to do the integration of above script in the lua service definition in template files OR is there any other way to call the external REST

