Incoming URL API request

From wiki.netio-products.com
Revision as of 16:19, 11 July 2019 by Phrych (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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