OpenWGA 7.7 - TMLScript reference
WGAObject:
WGA.HttpClient(url)
Description |
Creates an object to do HTTP requests to the specified URL. The returned object has methods get(), put(), post() and delete() to do the basic http requests to the specified URL. To read the response from the server those methods have to be called with a callback function as parameter. This callback is then called with a HttpResult object as parameter. WGA.HttpClient() is available since version 7.7.2 |
||||||||||||||||
Retrieval |
WGA.HttpClient(url) |
||||||||||||||||
Allowed in script types |
|
||||||||||||||||
Properties and methods |
|
||||||||||||||||
Examples |
// a simple get request WGA.HttpClient("http://some-domain.com").get(function(result){ if(result.status==200) console.log("result is", result.text); else console.error("HTTP Error", result.status) }) |