Method HttpMessagePart() :setHeader() Foundation

Sets the value of a HTTP header element.

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

:setParameter() returns the object executing the method.


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.


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.