Class: blob

Suit.request. blob

new Suit.request.blob()

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

Methods

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

Creates a GET request expecting 'blob' 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("GET","http://webservice.com",function(d,p,e){...},"blob");
//Using the shortcut
Suit.request.blob.get("http://webservice.com",function(d,p,e){...});

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

Creates a POST request expecting 'blob' 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){...},"blob");
//Using the shortcut
Suit.request.blob.post("http://webservice.com",function(d,p,e){...});

comments powered by Disqus