Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Oct 5, 2023

Option to Normalize HTTP_RESPONSE_HEADER Fields (Key Names) in the QSYS2 HTTP Functions

The HTTP header fields are case-insensitive. That is, content-type, CONTENT-TYPE, and CoNtEnT-tYpE are all allowed uses of the IANA registered field Content-Type.

Previously, when using the SYSTOOLS HTTP table functions (e.g., SYSTOOLS.HTTPGETCLOB), the HTTP response headers were returned in their native XML format. The XML response header could be parsed with the RPGLE op-code XML-INTO in a case-insensitive manner.

Now, when using the QSYS2 HTTP functions (e.g., QSYS2.HTTP_POST_VERBOSE), the HTTP response headers are returned as JSON. To parse the HTTP response, the SQL table function JSON_TABLE can be used. However, JSON path expressions used by the JSON_TABLE function are case-sensitive.

In my case, I am using the SQL HTTP functions to get data from business partners using RESTful API's. Depending on the partner we communicate with and even depending on the specific API call for the same vendor, the same HTTP response field may be coded with different casing. Furthermore, a change in the case of a header field (which, by definition is supposed to be case-insensitive) will break our production code.

Ideally, the QSYS2 HTTP functions should provide an option to upper-case or lower-case the HTTP response field names. This would allow for a consistent, case-insensitive parsing of the response headers. Additionally, any changes to the casing of an HTTP header field by our business partner would not break our production code.

Optionally, as the HTTP header fields are registered with IANA (see RFC 9110: HTTP Semantics and Hypertext Transfer Protocol (HTTP) Field Name Registry), the casing of fields that match a registered name could be aligned to the registered name casing. This would of course only solve the problem for registered field names.

Idea priority Medium
  • Admin
    Carmelita Ruvalcaba Cevallos
    Reply
    |
    Mar 26, 2024

    The CAAC has reviewed this IBM Idea and recommends that IBM view this as a high priority Idea that is important to be addressed.

    This would make it easier to code and having case sensitivity when its not needed is going to push people away from this solution.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual IBM Ideas on the broader IBM i community and has therefore reviewed your Idea.

    For more information about CAAC, see www.common.org/caac

    Carmelita Ruvalcaba - CAAC Program Manager

  • Guest
    Reply
    |
    Oct 23, 2023

    If the normalization of a HTTP header field results in a duplicate field name, the values should be returned as a JSON array. For example:

    {
    "HTTP_STATUS_CODE": 200,
    "Content-Type": "application/json",
    "Link": [
    "https://somedomain.tld/page1",
    "https://someotherdomain.tld/page2"
    ]
    }
  • Guest
    Reply
    |
    Oct 23, 2023
    IBM will use this Idea as input to planning, but no commitment is made or implied. This Idea will be updated in the future if IBM implements it

    Db2 for i development team
    IBM Power Systems Development