Try 30 days of free premium.

Force compression (suggestion for bandwidth reduction)

markg85 wrote 6 years ago: 1

Hi,

It seems that i'm allowed to make API requests with no Accept-Encoding set to none (aka, no compression). While this is nice of you, it does probably cause quite a lot of unnecessary bandwidth on your servers.

Here are 2 curl examples.

1: no encoding (26940 bytes)
curl https://api.tvmaze.com/shows/1/episodes --silent -H "Accept-Encoding: none" --write-out "%{size_download}\n" --output /dev/null

2: gzip encoding (6149 bytes)
curl https://api.tvmaze.com/shows/1/episodes --silent -H "Accept-Encoding: gzip" --write-out "%{size_download}\n" --output /dev/null

API users can just request a compressed version (above curl commands really work!), this saves everyone bandwidth. The API server owner should in my opinion consider enforcing encoding. The API you provide is awesome and free, this bandwidth reduction likely helps there :)

Cheers,
Mark


david wrote 6 years ago: 1

Thanks for the suggestion, but bandwidth is pretty cheap nowadays so this isn't much of a problem right now. :)

Try 30 days of free premium.