HTTPHEAD

The HTTPHEAD REST function verifies the HTTP header for the specified resource through an HTTP HEAD request. The HTTP header is returned as CLOB or XML data.

Tip: Start of changeThe sample HTTP user-defined functions are intended to be used within Db2 SQL applications to access remote non-Db2 REST-based services through SQL statements. Do not confuse them with Db2 native REST services, which supports using a REST-based interface to interact with Db2 data from web, mobile, and cloud applications.End of change
Read syntax diagramSkip visual syntax diagramHTTPHEAD( url,httpHeader)

The schema is DB2XML.

url
Specifies the URL of the resource. This argument is defined as a VARCHAR(2048) value.
httpHeader
Specifies an optional header XML document. This argument is defined as a CLOB(10K) value.

The XML header document can provide additional HTTP header values in the following format:

<httpHeader headerAttribute="headerAttributeValue">
        <header name="name" value="value" />
</httpHeader>
headerAttribute
Specify any of the following optional attributes:
Start of changeconnectTimeoutEnd of change
Specifies an integer value for the connection timeout threshold in milliseconds.
readTimeout
Specifies an integer value for the read timeout threshold in milliseconds.
followRedirects
Specifies whether redirects should be followed. This is a boolean value.
useCaches
Specifies whether caches should be used. This is a boolean value.
headerAttributeValue
Specifies a value for the headerAttribute. Separate headerAttribute and headerAttributeValue combinations with single spaces.
name
The header name.
value
The header value.