Jaxer.XHR.SendOptions : Object
Return to: Jaxer Framework index

Options used to define the behavior of XHR.send.

Platform Support

Jaxer Server Framework Jaxer Client Framework
0.9 0.9

Constructors

Constructor Action Jaxer Server Framework Jaxer Client Framework
Jaxer.XHR.SendOptions Constructor() : Jaxer.XHR.SendOptions
Options used to define the behavior of XHR.send. Create a new SendOptions() to get the default options, then modify its properties as needed before passing it to XHR.send.
Show Details 0.9 0.9

Jaxer.XHR.SendOptions() : Jaxer.XHR.SendOptions

Options used to define the behavior of XHR.send. Create a new SendOptions() to get the default options, then modify its properties as needed before passing it to XHR.send.

Returns
Jaxer.XHR.SendOptions Returns an instance of SendOptions.

Properties

Property Action Jaxer Server Framework Jaxer Client Framework
pollingPeriod : Number
For async (client-side) requests, the number of milliseconds between polling for onreadystatechange, by default 11

(Advanced)
No Details 0.9 0.9
Visibility
advanced
as : String
Set to "text" to force interpreting the response as text regardless o mimetype. Set to "xml" to force interpreting the response as XML regardless of mimetype and returning the XML as an XML (DOM) object via XMLHttpRequest.responseXML. Set to null to not force anything - see overrideMimeType and responseType for finer control.
No Details 0.9 0.9
async : Boolean
Set to true for asynchronous (default), false for synchronous. Ignored for server-side requests, which are always synchronous.
No Details 0.9 0.9
cacheBuster : Boolean
If true (default), a random name and value query pair will be appended to the URL on each call
No Details 0.9 0.9
contentType : String
The content type of the request being sent (by default "application/x-www-form-urlencoded")
No Details 0.9 0.9
headers : Array
Set to null to use default headers; set to an array of [ name, value ] arrays to use custom headers instead
No Details 0.9 0.9
method : String
Should be "GET" or "POST" (default)
No Details 0.9 0.9
overrideMimeType : String
Set to null to use whatever mimetype the server sends in the response; set to a mimetype string (e.g. "text/plain") to force the response to be interpreted using the given mimetype
No Details 0.9 0.9
password : String
If the target URL requires authentication, specify this password, otherwise leave this as null.
No Details 0.9 0.9
responseText : String
Set to "text" (default) to use the responseText, to "xml" to use the responseXML, or "auto" to use the response's content-type to choose
No Details 0.9 0.9
timeout : Number
For async (client-side) requests, set to number of milliseconds before timing out, or 0 (default) to wait indefinitely
No Details 0.9 0.9
url : String
The URL to which the XMLHttpRequest is to be sent. On the client side, defaults to Jaxer.CALLBACK_URI which is used to handle function callbacks from client-side proxies to their server-side counterparts.
No Details 0.9 0.9
username : String
If the target URL requires authentication, specify this username, otherwise leave this as null.
No Details 0.9 0.9

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
getTransport() : void
The function to use to create the XMLHttpRequest, by default XHR.getTransport
No Details 0.9 0.9
onfailure() : void
Set to a custom callback function to call if unsuccessful (by default set to Jaxer.XHR.onfailure client-side). Its arguments are the error encountered, the "extra" information from the caller, and the XHR instance.
No Details 0.9 0.9
onfinished() : void
set to a custom function to call when done receiving (or timed out), usually to abort()
No Details 0.9 0.9
onreadytosend() : void
set to a custom function to call just before sending (e.g. to set custom headers, mimetype, keep reference to xhr object, etc.)
No Details 0.9 0.9
onsuccess() : void
Set to a function to call if successful. Its arguments are the response received back from the server, and any "extra" information passed in when calling send(). For synchronous calls, you can optionally set onsuccess to null to have XHR.send() return a value directly (and throw errors on failure/timeout).
No Details 0.9 0.9
ontimeout() : void
Set to a custom timeout function to call if timeout is used and the async request has timed out. Its arguments are the timeout error encountered, the "extra" information from the caller, and the XHR instance.
No Details 0.9 0.9
testSuccess() : void
Set to a custom function that receives the XMLHttpRequest (after readyState == 4) and tests whether it succeeded (by default Jaxer.XHR.testSuccess)
No Details 0.9 0.9
aptana_docs