Blizzard / api-wow-docs

Documentation for the World of Warcraft web APIs.
http://blizzard.github.com/api-wow-docs/
524 stars 66 forks source link

auction-data.json of some realms is too large, it can be compressed with gzip? #21

Closed imWildCat closed 11 years ago

imWildCat commented 11 years ago

I wanna to get the auction-data.json of a popular realm,but the json file(etc. http://www.battlenet.com.cn/auction-data/16b5c8ad6d4c1969761739bb1c95a622/auctions.json ) is too large to exceed the curl function limit of my server.

Could the API server compress the json file with gzip?

Best Regards.

kelsin commented 11 years ago

The server handles sending the file as gzipped for us. I just confirmed this by running the following two commands:

curl http://www.battlenet.com.cn/auction-data/16b5c8ad6d4c1969761739bb1c95a622/auctions.json --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/null

which outputted:

3206238

Then I tried without gzip:

curl http://www.battlenet.com.cn/auction-data/16b5c8ad6d4c1969761739bb1c95a622/auctions.json --silent --write-out "%{size_download}\n" --output /dev/null

which outputted:

14756793

So the support for gzip should already be there.

imWildCat commented 11 years ago

Thank you very much!