HTTPBLOB and HTTPCLOB scalar functions

The HTTPBLOB and HTTPCLOB REST functions complete an HTTP request with the specified HTTP verb.

Read syntax diagramSkip visual syntax diagram HTTPBLOBHTTPCLOB ( 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 HTTPBLOB function, this argument is defined as BLOB(2G). For the HTTPCLOB function, this argument is defined as CLOB(2G) CCSID 1208. This argument is required for the POST and PUT methods.

For the HTTPBLOB function, the result response message is returned as BLOB(2G). For the HTTPCLOB function, the result response message is returned as CLOB(2G) CCSID 1208.

Example

  • Use HTTPCLOB with the HTTP GET method to retrieve the group PTF information from the IBM® PSP website.
    VALUES SYSTOOLS.HTTPCLOB(
                 URL => 'https://www.ibm.com/support/pages/sites/default/files/inline-files/xmldoc.xml',
                 HTTPMETHOD => 'GET',
                 HTTPHEADER => NULL,
                 REQUESTMSG => NULL);
    The same operation could be performed using the HTTPGETCLOB function.
    VALUES SYSTOOLS.HTTPGETCLOB(
                 URL => 'https://www.ibm.com/support/pages/sites/default/files/inline-files/xmldoc.xml',
                 HTTPHEADER => NULL);