Classes

Method HttpMessagePart() :setHeader() Foundation

Sets the value of a HTTP header element.

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

:setParameter() returns the object executing the method.

Description

The method :setHeader() defines the value or values of an HTTP header element. Existing values are replaced by the value or values specified.

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

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.