io Class
Item Index
Methods
css
-
uri
-
[options]
Inserts one or more CSS files into the page.
Parameters:
-
uri
String | StringPath or array of paths to the CSS files.
-
[options]
Object optionalConfiguration options
Returns:
del
()
static
Alias for Y.io.delete()
delete
-
uri
-
[options]
Initiaites an AJAX call with the HTTP method DELETE.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
DELETE
()
deprecated
static
Alias for Y.io.delete()
deleteJSON
-
uri
-
[options]
Performs an AJAX request with the DELETE HTTP method and parses the response as JSON notation. Requires the JSON module.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
get
-
uri
-
[options]
Initiaites an AJAX call with the HTTP method GET.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
getJSON
-
uri
-
[options]
Performs an AJAX request with the GET HTTP method and parses the response as JSON notation. Requires the JSON module.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
json
-
uri
-
[options]
Performs an AJAX request and parses the response as JSON notation. Requires the JSON module.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
jsonp
-
uri
-
[options]
Performs a JSONP request. Requires the JSONP module.
Parameters:
-
uri
StringThe url of the JSONP service with the {callback} placeholder where the callback function name typically goes
-
[options]
Object optionalConfiguration options for the request
-
[timeout]
Number optionalMillisecond threshold for the transaction before being automatically aborted
-
[format]
Function optionalPreprocessor function to stitch together the supplied URL (first argument), the proxy function name (internally generated), and any additional arguments passed to JSONPRequest#send()
-
Returns:
post
-
uri
-
[options]
Initiaites an AJAX call with the HTTP method POST.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
postForm
-
uri
-
selector
-
[options]
Initiaites an AJAX call with the HTTP method POST and sends the data contained in the specified form element.
Parameters:
-
uri
StringQualified path to transaction resource.
-
selector
String | NodeCSS selector or Y.Node instance pointing to a form element.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
postJSON
-
uri
-
data
-
[options]
Performs an AJAX request with the POST HTTP method and parses the response as JSON notation. Requires the JSON module.
Parameters:
-
uri
StringQualified path to transaction resource.
-
data
ObjectData to send encoded as JSON
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
put
-
uri
-
[options]
Initiaites an AJAX call with the HTTP method PUT.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
putJSON
-
uri
-
data
-
[options]
Performs an AJAX request with the PUT HTTP method and parses the response as JSON notation. Requires the JSON module.
Parameters:
-
uri
StringQualified path to transaction resource.
-
data
ObjectData to send encoded as JSON
-
[options]
Object optionalSame configuration options as Y.io.xhr()
Returns:
abort()
method to cancel the request.
script
-
uri
-
[options]
Inserts one or more scripts tags.
Parameters:
-
uri
String | StringPath or array of paths to the scripts.
-
[options]
Object optionalConfiguration options
Returns:
xhr
-
uri
-
[options]
Method for initiating an ajax call.
Parameters:
-
uri
StringQualified path to transaction resource.
-
[options]
Object optionalConfiguration object for the transaction.
-
[method=GET]
String optionalHTTP method verb (e.g., GET or POST).
-
[data]
Object | String optionalThis 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 optionalForm 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 optionalObject 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 optionalMillisecond threshold for the transaction before being automatically aborted.
-
Returns:
abort()
method to cancel the request.