IBM Support

New HTTP functions based in QSYS2



These HTTP services are used to make HTTP requests that use web services. These functions allow the
SQL programmer to use Representational State Transfer (RESTful) via SQL, including Embedded SQL. The
services provide the same capabilities as the SYSTOOLS HTTP functions without the overhead of creating
a JVM.

The services uses the HTTP transport APIs that is part of the Integrated Web Services (IWS) client for ILE support.


You are in: IBM i Technology Updates > Db2 for i - Technology UpdatesDb2 for i Functional Enhancements > New HTTP functions based in QSYS2

These HTTP functions exists in QSYS2 and have lower overhead than the SYSTOOLS HTTP functions.
Additional benefits of the QSYS2 HTTP functions are HTTP authentication, proxy support, configurable
redirection attempts, and configurable SSL options.

Links to relevant documentation:

SQL programming: 

HTTP functions overview

SQL Reference

HTTP_GET scalar function

HTTP_GET_VERBOSE table function

HTTP_POST scalar function

HTTP_POST_VERBOSE table function

HTTP_PUT scalar function

HTTP_PUT_VERBOSE table function

HTTP_DELETE scalar function

HTTP_DELETE_VERBOSE table function

URL_ENCODE scalar function

URL_DECODE scalar function

BASE64_ENCODE scalar function

BASE64_DECODE scalar function

Simple examples:

-- Use HTTP_POST to ask IBM Watson to translate text from English --> Spanish

image 11438

-- Use HTTP_GET to find a list of JSON feeds that are public and free to use

image 11439

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000C4BAAU","label":"IBM i"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0;7.4.0;and future releases"}]

Document Information

Modified date:
08 September 2021