HTTP_GET_VERBOSE and HTTP_GET_BLOB_VERBOSE
The HTTP_GET_VERBOSE or HTTP_GET_BLOB_VERBOSE table function retrieves a text-based resource from the specified URL through an HTTP GET request. It returns a one row table that contains the normal HTTP response for the request and the header information returned from the HTTP request
- url
- An expression that returns a built-in character string or graphic string data type that specifies the URL of the resource being accessed.
- options
- An expression that returns a built-in character string or graphic string data type. This string must be formatted as a JSON object containing the options, including headers, for the request. See HTTP options for the list of options.
The result of the function is table containing a single row with the format shown in the following table.
Column name | Data type | Description |
---|---|---|
RESPONSE_MESSAGE |
CLOB(2G) CCSID 1208 for
HTTP_GET_VERBOSE or BLOB(2G) for HTTP_GET_BLOB_VERBOSE |
The HTTP response for the request. |
RESPONSE_HTTP_HEADER | CLOB(2G) CCSID 1208 | Header information returned from the HTTP request, formatted as specified by the verboseResponseHeaderFormat option. |
Notes
For more information about using the HTTP functions see HTTP functions overview.
Example
- Retrieve service information from the IBM® PSP website
using a certificate store created from a Java™ certificate
store. See SSL considerations for more information.
SELECT * FROM TABLE(QSYS2.HTTP_GET_VERBOSE( 'https://www.ibm.com/support/pages/sites/default/files/inline-files/xmldoc.xml', '{"sslCertificateStoreFile":"/home/javaTrustStore/fromJava.KDB"}'));