HTTPBLOBVERBOSE and HTTPCLOBVERBOSE table functions

The HTTPBLOBVERBOSE and HTTPCLOBVERBOSE REST table functions complete an HTTP request with the specified HTTP verb. They return a one row table that contains the normal HTTP response for the request and the header information returned from the HTTP request.

Read syntax diagramSkip visual syntax diagram HTTPBLOBVERBOSEHTTPCLOBVERBOSE ( URL => url , HTTPMETHOD => httpmethod , HTTPHEADER => httpHeader , REQUESTMSG => requestmsg )
The schema is SYSTOOLS.
url
Specifies the URL at which to complete the request. This argument is defined as a VARCHAR(2048) CCSID 1208 value.
httpmethod
Specifies the HTTP verb to use. Valid values are GET, POST, PUT, and DELETE.
httpHeader
Specifies an optional header XML document. To use the default HTTP header, specify NULL or the empty string. This parameter is a CLOB(10K) CCSID 1208 or an XML value.
See Foundational HTTP functions for a description of the header content.
requestmsg
Specifies the data to update at the specified URL. For the HTTPBLOBVERBOSE function, this argument is defined as BLOB(2G). For the HTTPCLOBVERBOSE function, this argument is defined as CLOB(2G) CCSID 1208. This argument is required for the POST and PUT methods.
The result of the function is a table containing the following two columns.
Table 1. HTTPBLOBVERBOSE and HTTPCLOBVERBOSE result table
Column name Data type Description
RESPONSEMSG
BLOB(2G)
or
CLOB(2G) CCSID 1208
depending on which
function is used
The normal HTTP response for the request.
RESPONSEHTTPHEADER
CLOB(1M) CCSID 1208
or
XML
based on the data type of
the httpHeader argument.
Header information returned from the HTTP request.

Example

  • This query returns the error information from using an incorrect URL to request the group PTF information from the IBM® PSP website.
    SELECT * FROM TABLE(SYSTOOLS.HTTPCLOBVERBOSE(
         URL => 'http://www.ibm.com/support/docview.wss?uid=nas4PSPbyNum&aid=1',
         HTTPMETHOD => 'GET',
         HTTPHEADER => NULL,
         REQUESTMSG => NULL));
    The RESPONSEHTTPHEADER result column contains the following information about the error.
    
    <?xml version="1.0" encoding="UTF-8" ?><httpHeader responseCode="301">
              <responseMessage>Moved Permanently....