Class: binary

Suit.request. binary

new Suit.request.binary()

Reference to the shortcuts for creating requests that expects ArrayBuffer as result.

Methods

staticSuit.request.binary.get(p_url, p_callback, p_data, p_headers){XmlHttpRequest}

Creates a GET request expecting 'arraybuffer' response.

Name Type Description
p_url String

URL

p_callback RequestCallback

Reference to the callback function to handle this request.

p_data ArrayBuffer | FormElement | String | Object | Blob nullable

Data to be sent.

p_headers Object nullable

Object containing custom headers.

See:
Returns:
Type Description
XmlHttpRequest
  • Reference to the created XmlHttpRequest object.
Example

//Using 'create'
Suit.request.create("GET","http://webservice.com",function(d,p,e){...},"arraybuffer");
//Using the shortcut
Suit.request.binary.get("http://webservice.com",function(d,p,e){...});

staticSuit.request.binary.post(p_url, p_callback, p_data, p_headers){XmlHttpRequest}

Creates a POST request expecting 'arraybuffer' response.

Name Type Description
p_url String

URL

p_callback RequestCallback

Reference to the callback function to handle this request.

p_data ArrayBuffer | FormElement | String | Object | Blob nullable

Data to be sent.

p_headers Object nullable

Object containing custom headers.

Returns:
Type Description
XmlHttpRequest
  • Reference to the created XmlHttpRequest object.
Example

//Using 'create'
Suit.request.create("POST","http://webservice.com",function(d,p,e){...},"arraybuffer");
//Using the shortcut
Suit.request.binary.post("http://webservice.com",function(d,p,e){...});

comments powered by Disqus