:: Documentation >>

parameter

Sets request arguments (parameters).

When using GET method the parameters are added to the request URL as name-value pairs. With POST method the parameters are encoded into the data sent with the request.

Syntax

var value = obj.getParameter(name); 
obj.setParameter(name, value);        

Parameters

name (string) - parameter name
value (string or function or array) - parameter value

Examples

var req = new AW.HTTP.Request;
req.setURL('/application/service.asmx'); 
req.setParameter('id', 12345);           // set 'id' parameter
req.setParameter('filter', 'none');      // set 'filter' parameter
req.request(); // calls  /application/service.asmx?id=12345&filter=none

Remarks

When parameter type is function it is evaluated each time the request is sent. When the parameter type is array - each array value is sent as a separate name=value pair (using the same name).

See also

requestMethod property, requestData property

Comments

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5