Difference between revisions of "Incoming URL API request"

From wiki.netio-products.com
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:Script trigger Incoming URL API request}} Trigged when NETIO recieves URL API request. Arguments are given in url. Arguments are stored in table <code>event.arg...")
 
(No difference)

Latest revision as of 17:19, 11 July 2019

Trigged when NETIO recieves URL API request. Arguments are given in url. Arguments are stored in table event.args

Example

URL: http://192.168.101.139/event?arg1=25&arg2=hello

Argument 1:

  • key: arg1
  • value: 25

Argument 2:

  • key: arg2
  • value: hello

Print arguments

-- print all arguments
for i, v in pairs(event.args) do
  logf("%s: %s",tostring(i),tostring(v))
end