The result data type is a LONG VARCHAR. If you use NEXT_HTTP_HEADER in a SELECT INTO statement, you must have an Unstructured
Data Analytics Option license or use CAST and set HTML_DECODE to the correct data type and size.
This function is used to iterate over the HTTP request headers returning the next HTTP header name. Calling it with NULL causes
it to return the name of the first header. Subsequent headers are retrieved by passing the name of the previous header to
the function. This function returns NULL when called with the name of the last header, or when not called from a web service.
Calling this function repeatedly returns all the header fields exactly once, but not necessarily in the order they appear
in the HTTP request.
The following statement displays the name and values of the HTTP request headers in the database server messages window when
used within a stored procedure that is called by an HTTP web service:
declare header_name long varchar;
declare header_value long varchar;
set header_name = NULL;
SET header_name = NEXT_HTTP_HEADER( header_name );
IF header_name IS NULL THEN
SET header_value = HTTP_HEADER( header_name );
MESSAGE 'HEADER: ', header_name, '=',
header_value TO CONSOLE;