OpenWGA 7.7 - TMLScript reference

WGA » WGA.HttpClient()
Method :

post(data [, contenttype [, charset]][, callback])

On object WGA.HttpClient()
Usage Sends a POST Request to the URL specified in HttpClient object
Parameters

data (String):

The data to be sent.

contenttype (String, optional)

The contenttype to be used. Default is text/plain

charset (String, optional)

The charset to be used. Default is the configured OpenWGA output encoding (normally UTF-8).

callback:

An optional JS-Function to read the response. The callback is called with an HttpResult object as parameter.

Return value

HTTP Status Code

Examples
WGA.HttpClient("http://some-domain.com").post("hallo", function(result){
    if(result.status==200)
    	console.log("success");
    else console.error("HTTP Error", result.status)
})