:: Home >>

AW.HTTP.Request

XML HTTP Request object.

AW.HTTP.Request is a simple wrapper around XMLHttpRequest class in Mozilla or XMLHTTP ActiveX in IE (it also uses native XMLHttpRequest class in IE7). It is intended as a base class for CSV and XML data sources but could be used for standalone AJAX requests as well.

Constructor

 var obj = new AW.HTTP.Request; 

Hierarchy

Derived Classes:
AW.CSV.Table
AW.XML.Table

Properties

asyncIndicates whether asynchronous download is permitted.
namespaceAllows to specify namespaces for use in XPath expressions.
parameterAllows to specify the request arguments/parameters.
passwordSets or retrieves the password.
requestDataAllows to send data with the request.
requestHeaderSets HTTP request header.
requestMethodSpecifies HTTP request method.
responseHeaderReturns HTTP response header (for example "Content-Type").
responseTextReturns response text.
responseXMLReturns response XML.
URLSets or retrieves the remote data URL.
usernameSets or retrieves the user name.

Methods

cloneCreates an object clone.
definePropertyCreates get/set methods for the property.
getAsyncReturns async property
getPasswordReturns password property
getPropertyReturns property value.
getRequestDataReturns requestData property
getRequestMethodReturns requestMethod property
getResponseHeaderReturns responseHeader property
getResponseTextReturns responseText property
getResponseXMLReturns responseXML property
getURLReturns URL property
getUsernameReturns username property
initInitializes the object.
isReadyReturns true if the model data is available.
requestSends the request.
responseAllows to process the received data.
setAsyncSets async property
setNamespaceSets namespace property
setParameterSets parameter property
setPasswordSets password property
setPropertyAssigns property value.
setRequestDataSets requestData property
setRequestHeaderSets requestHeader property
setRequestMethodSets requestMethod property
setResponseTextSets responseText property
setResponseXMLSets responseXML property
setTimeoutCalls the function after the specified delay.
setURLSets URL property
setUsernameSets username property
toStringConverts object to string.

Examples

var req = new AW.HTTP.Request;
req.setURL('<url>');
req.response = function(text) {
    alert(text); // do something with response here
};
req.request();

Comments

20 Jan 09
How can i to send a lot of rows? JDF (0)
23 Jun 08
How to access Status Code and Status Message Thomas Henrichs (1)
12 Nov 07
Problem with response's character set.... John Mason (2)
10 Nov 07
can you give a JSP example for returning a reponse to AW.HTTP.Request Precidion (0)
17 Feb 07
anyone can give code example for this one jhon (0)
11 Nov 06
Need to have lowercase filename Jeff C. (5)
9 Jul 06
Question on XMLHttpRequest implementation Bryn (1)
12 May 06
AW.HTTP.Request not working in IE 5.5 jt (1)
1 May 06
HTTP.Request problem kbazsi (5)

Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.5.0 - 2.5.3
2.5.3
2.5.0 - 2.5.2
2.5.2
2.5, 2.5.1
2.5.1
2.5
Release History
2.5
2.0.2