SAP Open Connectors

Setting Parameters on Every Call with a Few Exceptions

If you are building your own connector and you need to set a parameter on almost every call, it feels tedious to add the parameter to almost every resource. However, if you add it to the parameters on the Setup tab, it adds the parameter to every call—even the ones you may not want it on. To resolve this issue, you can still add it in the Setup parameters and use a pre-hook to the few resources where it should not be included. This pre-hook should set the header parameter to null.

Below is an example of code you could add to the pre-hook to remove a header:

let vHeaders = request_vendor_headers;

if (vHeaders && vHeaders.Authorization) {
    vHeaders.Authorization = null;
        "request_vendor_headers": vHeaders