Compression

The SkillsEngine API can produce fairly large and complex JSON results. In order to help keep everyone's bandwidth costs down and improve overall performance of apps interacting with the API, we've implemented GZIP-compressed output support.

Requesting GZIP-compressed output is optional, but highly recommended, especially for apps expecting to do lots of API requests and apps that want to minimize the effects of network latency on those requests.

To receive GZIP-compressed output, simply include the standard Accept-Encoding header in your requests:

Accept-Encoding: gzip,deflate

The API will then return all results in GZIP-compressed format. Before you can parse it with a JSON library, you'll need to decompress it. Nearly all major programming languages include libraries that should handle decompressing GZIP easily.

Example: Decompressing GZIP in Ruby

require 'zlib'
str_json = Zlib::GzipReader.new(response.body, encoding: 'ASCII-8BIT').read