Mercurial > hg > orthanc
comparison Resources/Samples/Lua/CallWebService.lua @ 2947:11f8d72f366f
Lua 5.3.5
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2018 18:40:51 +0100 |
parents | 65b1ce7cb84f |
children |
comparison
equal
deleted
inserted
replaced
2946:2e751f615e03 | 2947:11f8d72f366f |
---|---|
3 -- to start the "CallWebService.js" script next to this file using | 3 -- to start the "CallWebService.js" script next to this file using |
4 -- NodeJs. | 4 -- NodeJs. |
5 | 5 |
6 -- Download and install the JSON module for Lua by Jeffrey Friedl | 6 -- Download and install the JSON module for Lua by Jeffrey Friedl |
7 -- http://regex.info/blog/lua/json | 7 -- http://regex.info/blog/lua/json |
8 JSON = (loadstring(HttpGet('http://regex.info/code/JSON.lua'))) () | 8 |
9 -- NOTE : Replace "load" by "loadstring" for Lua <= 5.1 | |
10 JSON = (load(HttpGet('http://regex.info/code/JSON.lua'))) () | |
9 | 11 |
10 SetHttpCredentials('alice', 'alicePassword') | 12 SetHttpCredentials('alice', 'alicePassword') |
11 | 13 |
12 function OnStoredInstance(instanceId, tags, metadata) | 14 function OnStoredInstance(instanceId, tags, metadata) |
13 -- Build the POST body | 15 -- Build the POST body |