XmlHttpRequest

description

This class is based on the W3C standard that can be found at http://www.w3.org/TR/XMLHttpRequest.  It has only a few extensions and is not capable of returning an XML document (yet).

Summary
This class is based on the W3C standard that can be found at http://www.w3.org/TR/XMLHttpRequest.
Unlike the standard, this function currently returns a string.
An extension of the standard, lets you retrieve the response body as a binary Data object.
An extension of the standard.
The parameters async, user and password are optional.
The data argument is optional.
An extension of the standard, lets you send a binary Data object.

Properties

readystate

readonly int readystate

responseText

string responseText readonly

responseXML

string responseXML readonly

Unlike the standard, this function currently returns a string.

responseData

Data responseData readonly dynamic

An extension of the standard, lets you retrieve the response body as a binary Data object.

status

int status readonly

statusText

string statusText readonly

failed

bool failed readonly

An extension of the standard.  Lets you easily check if the request failed.

returns

trueIf readystate is 4 (DONE) and the responseText is null.
falseOtherwise.

Functions

open

void open(string method,
string url,
jsval async,
jsval user,
jsval password)

The parameters async, user and password are optional. async defaults to true.

setRequestHeader

void setRequestHeader(string header,
string value)

send

void send(string data)

The data argument is optional.

abort

void abort()

getAllResponseHeaders

string getAllResponseHeaders()

getResponseHeader

string getResponseHeader(string header)

sendData

void sendData(Data data)

An extension of the standard, lets you send a binary Data object.

Events

onreadystatechange

callback void onreadystatechange()
readonly int readystate
string responseText readonly
string responseXML readonly
Unlike the standard, this function currently returns a string.
Data responseData readonly dynamic
An extension of the standard, lets you retrieve the response body as a binary Data object.
This class lets you manipulate binary data.
int status readonly
string statusText readonly
bool failed readonly
An extension of the standard.
void open(string method,
string url,
jsval async,
jsval user,
jsval password)
The parameters async, user and password are optional.
void setRequestHeader(string header,
string value)
void send(string data)
The data argument is optional.
void abort()
string getAllResponseHeaders()
string getResponseHeader(string header)
void sendData(Data data)
An extension of the standard, lets you send a binary Data object.
callback void onreadystatechange()