com.HTTPRequest.setHeader
Sets an HTTP header for the request.
Syntax
setHeader(
name STRING,
value STRING )
- name defines the HTTP header name.
- value defines the HTTP header value.
Usage
The setHeader()
method defines an HTTP header with a name and
value for the request.
If a header exists with the same name, it is replaced with the new value.
Setting a header after the body has been sent, or if a streaming operation has been started, will not take effect. It will only be set when a new request is reissued.
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).