We have an API that uses the Invoke policy to make a call out to a Bluemix Cloudant database. Recently that API was updated to return gzip encoded data, this caused our code in the microgateway to fail. After the Invoke policy we have a Javascript policy and our reference to message.body.id now fails.
To workaround this we now use a Set-Variable policy to set request.headers.accept-encoding to gzip;q=0 and now our Javascript policy code works again.
Should the Invoke policy support data returned compressed?
What is the IBM best practice for this? I am sure it is not to disable compression like we did.
We have an API that uses the Invoke policy to make a call out to a Bluemix Cloudant database. Recently that API was updated to return gzip encoded data, this caused our code in the microgateway to fail. After the Invoke policy we have a Javascript policy and our reference to message.body.id now fails.
To workaround this we now use a Set-Variable policy to set request.headers.accept-encoding to gzip;q=0 and now our Javascript policy code works again.
Should the Invoke policy support data returned compressed? What is the IBM best practice for this? I am sure it is not to disable compression like we did.
Thanks in advance