Method HttpRequestMessage() :setParameter() Foundation

Sets the value of a HTTP parameter.

Syntax
 
:setParameter( <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

:setParameter() returns the object executing the method.

Description

The method :setParameter() defines the value or values of a certain HTTP parameter. Existing values are replaced with the value or values specified.

If a character string is assigned to the <cValue> parameter, the value of the HTTP parameter is changed to the specified string. Alternatively, an array can be passed in <aValues> in which case the parameter value is set to the list of character values specified in the array elements.

The methods :addParameter(), :delParameter(), :getParameter(), :getParameters() and their respective :set..() counterparts allow direct and easy manipulation of name-value pairs that are transferred in the Http request. The parameters are transferred according to the request method. For the request method "GET", the parameters are transferred as name-value pairs in the query string. If the request method is "POST" or "PUT", the parameters are converted according to the content type and transferred in the body of the Http request.

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.