Class: AjaxConnector

OSH.DataConnector. AjaxConnector

Defines the AjaxConnector to connect to a remote server by making AjaxRequest.

new OSH.DataConnector.AjaxConnector()

Example

var request = ...;
var connector = new OSH.DataConnector.AjaxConnector(url);

// handle onSuccess
connector.onSuccess = function(event) {
// does something
}

connector.onError = function(event) {
// does something
}

// send request
connector.sendRequest(request);

Extends

Methods

The data connector default id.

Returns:
Type Description
string

The stream url.

Returns:
Type Description
string

This is the callback method in case of getting error connection.

Name Type Description
event

The error details

This is the callback method in case of getting success connection.

Name Type Description
event

Sends the request to the defined server.

Name Type Description
request

The Http request (as a String format)