API Docs for:
Show:

io Class

Item Index

Methods

Methods

css

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:164

Inserts one or more CSS files into the page.

Parameters:

  • uri String | String

    Path or array of paths to the CSS files.

  • [options] Object optional

    Configuration options

Returns:

Promise: Promise for the response object.

del

() static

Defined in js\io-utils.js:120

Alias for Y.io.delete()

delete

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:92

Initiaites an AJAX call with the HTTP method DELETE.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

DELETE

() deprecated static

Defined in js\io-utils.js:112

Alias for Y.io.delete()

deleteJSON

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:288

Performs an AJAX request with the DELETE HTTP method and parses the response as JSON notation. Requires the JSON module.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

get

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:59

Initiaites an AJAX call with the HTTP method GET.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

getJSON

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:250

Performs an AJAX request with the GET HTTP method and parses the response as JSON notation. Requires the JSON module.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

json

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:227

Performs an AJAX request and parses the response as JSON notation. Requires the JSON module.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

jsonp

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:188

Performs a JSONP request. Requires the JSONP module.

Parameters:

  • uri String

    The url of the JSONP service with the {callback} placeholder where the callback function name typically goes

  • [options] Object optional

    Configuration options for the request

    • [timeout] Number optional

      Millisecond threshold for the transaction before being automatically aborted

    • [format] Function optional

      Preprocessor function to stitch together the supplied URL (first argument), the proxy function name (internally generated), and any additional arguments passed to JSONPRequest#send()

Returns:

Promise: Promise for the response object.

post

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:70

Initiaites an AJAX call with the HTTP method POST.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

postForm

(
  • uri
  • selector
  • [options]
)
Promise static

Defined in js\io-utils.js:129

Initiaites an AJAX call with the HTTP method POST and sends the data contained in the specified form element.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • selector String | Node

    CSS selector or Y.Node instance pointing to a form element.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

postJSON

(
  • uri
  • data
  • [options]
)
Promise static

Defined in js\io-utils.js:262

Performs an AJAX request with the POST HTTP method and parses the response as JSON notation. Requires the JSON module.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • data Object

    Data to send encoded as JSON

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

put

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:81

Initiaites an AJAX call with the HTTP method PUT.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

putJSON

(
  • uri
  • data
  • [options]
)
Promise static

Defined in js\io-utils.js:275

Performs an AJAX request with the PUT HTTP method and parses the response as JSON notation. Requires the JSON module.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • data Object

    Data to send encoded as JSON

  • [options] Object optional

    Same configuration options as Y.io.xhr()

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.

script

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:154

Inserts one or more scripts tags.

Parameters:

  • uri String | String

    Path or array of paths to the scripts.

  • [options] Object optional

    Configuration options

Returns:

Promise: Promise for the response object.

xhr

(
  • uri
  • [options]
)
Promise static

Defined in js\io-utils.js:7

Method for initiating an ajax call.

Parameters:

  • uri String

    Qualified path to transaction resource.

  • [options] Object optional

    Configuration object for the transaction.

    • [method=GET] String optional

      HTTP method verb (e.g., GET or POST).

    • [data] Object | String optional

      This is the name-value string that will be sent as the transaction data. If the request is HTTP GET, the data become part of querystring. If HTTP POST, the data are sent in the message body.

    • [form] Object optional

      Form serialization configuration object. Its properties are: * id node object or id of HTML form * useDisabled true to also serialize disabled form field values (defaults to false)

    • [headers] Object optional

      Object map of transaction headers to send to the server. The object keys are the header names and the values are the header values.

    • [timeout] Number optional

      Millisecond threshold for the transaction before being automatically aborted.

Returns:

Promise: Promise for the response object. Contains an extra abort() method to cancel the request.