Using http

Verified
Added by iNTERFACEWARE

Using http.get{} http.post{} and http.put{} commands

Source Code
   -- get data from a web service
   local Results = net.http.get{url='http://example.interfaceware.com:6544/hello', live = true}
   
   -- post to web service
   local Results = net.http.post{url='http://example.interfaceware.com:6544/hello', live = true}
   
   -- put to a web service
   local Results = net.http.put{url='http://example.interfaceware.com:6544/hello', data = 'substitute real data', live = true}
Description
Using http.get{} http.post{} and http.put{} commands
Usage Details

Examples of simple http commands for get, post and put. The code connects to the simple “hello world” web service that we created as a wiki example.

How to use the snippet:

  • Paste the code into your script
  • Change the url parameter to point to your desired web service