pierpy
pierpy

Reputation: 1322

How to return compressed response in IBM Cloud Functions?

I have an HTTP enabled function, Node.js, that returns a big JSON (about 1.2 MB). Is there any way to compress that before sending to browser? I'm aware of Node module zlib, but I'm wondering if there is a predefined way to do that in actions. I haven't found anything about it in IBM or OpenWhisk docs

EDIT:
In my tests I have inspected request headers, the browser offers accept-encoding: gzip, deflate, br as usual

Upvotes: 0

Views: 37

Answers (0)

Related Questions