An object with the following properties:
- handleAs (String, optional):
Acceptable values are: text (default), json, json-comment-optional,
- sync (Boolean, optional):
false is default. Indicates whether the request should
be a synchronous (blocking) request.
- headers (Object, optional):
Additional HTTP headers to send in the request.
- failOk (Boolean, optional):
false is default. Indicates whether a request should be
allowed to fail (and therefore no console error message in
the event of a failure)
- contentType (String|Boolean):
"application/x-www-form-urlencoded" is default. Set to false to
prevent a Content-Type header from being sent, or to a string
to send a different Content-Type.
This function will be
called on a successful HTTP response code.
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.
This function will
be called at the end of every request, whether or not an error occurs.
- url (String):
URL to server endpoint.
- content (Object, optional):
Contains properties with string values. These
properties will be serialized as name1=value2 and
passed in the request.
- timeout (Integer, optional):
Milliseconds to wait for the response. If this time
passes, the then error callbacks are called.
- form (DOMNode, optional):
DOM node for a form. Used to extract the form values
and send to the server.
- preventCache (Boolean, optional):
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 (String, optional):
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.
- ioPublish (Boolean, optional):
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.