Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-3949

Add support for returning response.header in consoleFetchCommon function

XMLWordPrintable

    • 2
    • False
    • None
    • False
    • OCPSTRAT-924 - Console: Customer Happiness (RFEs) for 4.16
    • HAC Infra OCP - Sprint 250

       Add support for returning `response.header` in `consoleFetchCommon` function in the dynamic-plugin-sdk package

       

      Problem: 

      The `consoleFetchCommon function in the dynamic-plugin-sdk package lack the support for retrieving HTTP `response.header`. 

       

      Justification:

       The policy warning responses are visible in the `oc cli` but not visible on the console UI.  The customer wants a similar behavior on the UI. The policy warning responses are returned in the HTTP `response.header` which is not implemented in the  `consoleFetchCommon` function currently.

       

      Proposed Solution

       Add logic for extracting all `response.headers` along with `response.json` in the `consoleFetchCommon` function using `options` or something else. 

       

      A.C. 

        Add an option parameter to `consoleFetchCommon` to conditionally return full `response` or `response.json` so that the k8s functions like "K8sCreate` consume either, preventing breaking change for dynamic plugins

              cajieh Cyril Ajieh
              cajieh Cyril Ajieh
              Yanping Zhang Yanping Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: