Classes

Method HttpMessage() :addParameter() Foundation

Adds a HTTP parameter.

Syntax
 
METHOD :addParameter( <cName>, <cValue>|<aValues>  ) --> self
Parameters
<nName>
A character string with the name of the parameter.
<cValue>
A character string with the value of the parameter.
<aValues>
An array of parameter values, specified as character strings.
Return

:addParameter() returns the object executing the method.

Description

The method :addParameter() adds a HTTP parameter to the parameter list along with its value. Existing values are preserved, which means that if a parameter named <cName> already exists, the value specified in <cValue> is appended to this parameter's value list.

For adding a parameter with multiple values to the parameter list, an array of values can be assigned to the <aValues> parameter. In this case, the values in the array elements are added to the value list of the HTTP parameter in one go, instead of having to calling :addParameter() repeatedly.

HTTP parameters are transferred as part of the query string. The methods :addParameter(), :delParameter(), :getParameter(), :getParameters() and their respective :set..() counterparts allow direct and easy manipulation of this part of the HTTP query string. Use the method :getQueryString() for obtaining a reference to the complete string.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.