We have a requirement where we need to decompress gzip string in Apigee Edge before sending it to Target Server.
Consuming app will be sending gzip data but target server doesn't support gzip format. So we need to decompress in Apigee.
How to achieve this ?
I tried using Content-Encoding : gzip and then passed the gzip data. But i am getting following error :
{ "fault": { "faultstring": "Failed to Decompress", "detail": { "errorcode": "messaging.adaptors.http.DecompressionFailure" } } }
@mdunker@apigee.com @Mike Dunker
Can you please help ?
Hi @Swapnil Raverkar - this is an Edge question, not BaaS -- I've pinged internal people to see if they can help.
Hi,
Are you really sending gzip data? That error usually occurs if the data is not compressed.
Create a gzip file, something small for testing using "gzip filename", then send it will curl, you'll need to fix up the DNS to reflect your own org/env.
curl -v -X POST -H "Content-Encoding: gzip" http://{your-org}-test.apigee.net/<your_api>; -d @<filename>.gz
If that works set your target server properties. See:
http://docs.apigee.com/api-services/reference/endpoint-properties-reference
property is: compression.algorithm, set to 'none'
I was trying with Postman to submit a gzip compressed file, which wasn't getting submitted properly it seems.
It's working as expected now & Edge is decompressing the file.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |