Make response more compact to save bandwidth, thus improve overall performance
Aside from #17 (closed) where we could save 3 bytes just because 1
is shorter than true
, there are also extra white spaces that we could avoid to save bandwidth:
curl -s -d '{"id":9,"jsonrpc":"2.0","method":"account_history_api.get_account_history","params":{"account":"gtg","start":2345678,"limit":1}}' https://api.hive.blog | wc -c
377
while
curl -s -d '{"id":9,"jsonrpc":"2.0","method":"account_history_api.get_account_history","params":{"account":"gtg","start":2345678,"limit":1}}' $HAFAH_ENDPOINT | wc -c
413