The Airthings Business API now supports Gzip compression of the response payloads.
Why use compression?
As your sensor networks grow and the volume of historical data or device lists increases, API payloads can become quite large. Enabling Gzip compression can reduce the size of the data transferred by up to 80%, resulting in:
- Faster response times for your applications.
- Lower data consumption, which is particularly beneficial for high-frequency data polling applications.
How to enable Compression
To start receiving compressed data, simply add the Accept-Encoding header to your GET requests:
Header: Accept-Encoding: gzip
NOTE: Most modern HTTP clients (like Axios, Python Requests, or Go’s http package) handle decompression automatically once this header is present, but make sure your client handles decompression before rolling out your changes.
