Can't use lua's modules with orthanc docker image

90 views
Skip to first unread message

Ankush Gupta

unread,
Apr 10, 2023, 1:44:03 AM4/10/23
to Orthanc Users
Hello everyone , 
I want to use lua's module "socket.http" to hit gobal Restapi  inside my lua script.  But orthanc not allowing it. I am using orthanc docker image. 
below is lua script for auto-routing 
local http = require("socket.http")
   function OnStoredInstance(instanceId, tags, metadata, origin)
    if origin['RequestOrigin'] ~= 'Lua' then
      local response,status = http.request("https://jsonplaceholder.typicode.com/todos/1")
      print(response,status)
       RestApiPost('/modalities/modality-name/store', instanceId)
       -- Delete the original and the modified instances
       RestApiDelete('/instances/' .. instanceId)
    end
 end
Any help or suggestion will be a great for me 

Reply all
Reply to author
Forward
0 new messages