This function returns the value of the named HTTP response header field, or NULL if a header for the given header-field-name does not exist or if it is not called from an HTTP service.
Some headers that may be of interest when processing an HTTP web service response include the following:
The Connection field allows the sender to specify options that are desired for that particular connection. In a SQL Anywhere
HTTP server response, the option is always "close".
The Content-Length field indicates the size of the response body, in decimal number of octets.
The Content-Type field indicates the media type of the body sent to the recipient. Example: text/xml
The Date field represents the date and time at which the response was originated.
The Expires field gives the date and time after which the response is considered stale.
The Location field is used to redirect the recipient to a location for completion of the request or identification of
a new resource.
The Server field contains information about the software used by the origin server to handle the request. In a SQL Anywhere
HTTP server response, the web server name together with the version number is returned.
The Transfer-Encoding field indicates what (if any) type of transformation has been applied to the message body in order
to safely transfer it between the sender and the recipient.
The User-Agent field contains information about the user agent originating the request. In a SQL Anywhere HTTP server
response, the web server name together with the version number is returned.
The WWW-Authenticate field is included in 401 (Unauthorized) response messages.
When used within a stored procedure that is called by an HTTP web service, the following example displays the name and values
of the HTTP response headers in the database server messages window.
declare header_name long varchar;
declare header_value long varchar;
set header_name = NULL;
SET header_name = NEXT_HTTP_RESPONSE_HEADER( header_name );
IF header_name IS NULL THEN
SET header_value = HTTP_RESPONSE_HEADER( header_name );
MESSAGE 'RESPONSE HEADER: ', header_name, '=', header_value TO CONSOLE;