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.
var value = obj.getParameter(name);
obj.setParameter(name, value);
name (string) - parameter name
value (string or function or array) - parameter value
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
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).