W3cubDocs

/Dojo

dojo/main.__IoArgs

Note: This is not a real constructor, but just a description of the type of object that should be passed as a parameter to some method(s), and/or the return value from some method(s). In other words, the type exists only for documentation purposes, and you cannot call new main.__IoArgs()

Properties

content

Defined by: dojo/_base/xhr

Contains properties with string values. These properties will be serialized as name1=value2 and passed in the request.

form

Defined by: dojo/_base/xhr

DOM node for a form. Used to extract the form values and send to the server.

handleAs

Defined by: dojo/_base/xhr

Acceptable values depend on the type of IO transport (see specific IO calls for more information).

ioPublish

Defined by: dojo/_base/xhr

Set this explicitly to false to prevent publishing of topics related to IO operations. Otherwise, if djConfig.ioPublish is set to true, topics will be published via dojo/topic.publish() for different phases of an IO operation. See dojo/main.__IoPublish for a list of topics that are published.

preventCache

Defined by: dojo/_base/xhr

Default is false. If true, then a "dojo.preventCache" parameter is sent in the request with a value that changes with each request (timestamp). Useful only with GET-type requests.

rawBody

Defined by: dojo/_base/xhr

Sets the raw body for an HTTP request. If this is used, then the content property is ignored. This is mostly useful for HTTP methods that have a body to their requests, like PUT or POST. This property can be used instead of postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.

timeout

Defined by: dojo/_base/xhr

Milliseconds to wait for the response. If this time passes, the then error callbacks are called.

url

Defined by: dojo/_base/xhr

URL to server endpoint.

Methods

error(response,ioArgs)

Defined by dojo/_base/xhr

This function will be called when the request fails due to a network or server error, the url is invalid, etc. It will also be called if the load or handle callback throws an exception, unless djConfig.debugAtAllCosts is true. This allows deployed applications to continue to run even when a logic error happens in the callback, while making it easier to troubleshoot while in debug mode.

Parameter Type Description
response Object

The response in the format as defined with handleAs.

ioArgs dojo/main.__IoCallbackArgs

Provides additional information about the request.

handle(loadOrError,response,ioArgs)

Defined by dojo/_base/xhr

This function will be called at the end of every request, whether or not an error occurs.

Parameter Type Description
loadOrError String

Provides a string that tells you whether this function was called because of success (load) or failure (error).

response Object

The response in the format as defined with handleAs.

ioArgs dojo/main.__IoCallbackArgs

Provides additional information about the request.

load(response,ioArgs)

Defined by dojo/_base/xhr

This function will be called on a successful HTTP response code.

Parameter Type Description
response Object

The response in the format as defined with handleAs.

ioArgs dojo/main.__IoCallbackArgs

Provides additional information about the request.

© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/main.__IoArgs.html