Method HttpRequestMessage() :getParameters() Foundation

Gets multiple HTTP parameter values.

Syntax
 
:getParameters( [<cName>] ) --> aValues | NIL
Parameters
<nName>
A character string with the name of the parameter. This parameter is optional. If omitted, :getParameters()returns the values of all parameters.
Return

:getParameters() returns an array with parameter information. If a parameter name is assigned <cName>, the array contains one element with a character string for each parameter value. If no values are defined, :getParameters()returns an empty array. If no parameter named <cName> exits, the method returns NIL.

If no parameter name is specified in <cName>, :getParameters()returns the values of all parameters defined. In this case, return is an array containing one element per HTTP parameter. Each element contains a sub-array of the form {<cName>,{<cValue1>,..,<cValueN>}}, where <cName> is the name of the respective parameter, and {<cValue1>,..<cValueN>} is an array with the parameter values. For parameters without a value, this array is empty. If no parameters are defined for the message, the method returns an empty array.

Description

The method :getParameters() gets the values of all HTTP parameters with a given name. If no parameter is specified, the method can also be used to get the values of all HTTP parameters which are defined.

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.