question

brendan avatar image
brendan asked

Optimizing data sent/received

Brendan Vanous
started a topic on Sat, 26 September 2015 at 3:03 PM

Question from a developer:

Since the JSON being sent and received is just text, and text compresses well, is there a way to optimize my packets using zip?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Sat, 26 September 2015 at 3:04 PM

Yes, we support gzip encoding for both requests and responses. To receive gzipped responses, add the following request header to your call:

Accept-Encoding: gzip

To use gzipped content in your requests, add the following request header and gzip the request data:

Content-Encoding: gzip

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nicolas C avatar image Nicolas C commented ·
@Brendan

Any reason why content is not gzipped by default?

0 Likes 0 ·
brendan avatar image brendan Nicolas C commented ·

If you're using any of our SDKs, it is. If you're not, you would need to specify the encoding headers above (and gzip packets you send).

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.