Add support for GZIP encoding
Closed this issue · 1 comments
cbortz commented
The Vainglory API allows for requesting compressed responses if desired, so we should support that. The plan is to leave it disabled by default. When instantiating a new VaingloryAPI::Client
a user should be able to pass in the option to enable it. For example:
VaingloryAPI.new("API_KEY", "na", gzip: true)
Additional information: https://developer.vainglorygame.com/docs#gzip
As a side note...
After looking at the previous example, I think I want to start accepting a single options
parameter as a hash when instantiating new clients. The updated syntax might look like this:
VaingloryAPI.new("API_KEY", region: "na", gzip: true)
If I do implement this change, I should allow for backward compatibility because I am nowhere near ready to bump to v1.
cbortz commented
Closing this because Net::HTTP
does this for us automatically.