Here is an example of properly formed HTTP headers for enabling gzip compression: Accept-Encoding: gzipĪnother way to improve the performance of your API calls is by sending and receiving only the portion of the data that you're interested in. In order to receive a gzip-encoded response you must do two things: Set an Accept-Encoding header, and modify your user agent to contain the string gzip. Although this requires additional CPU time to uncompress the results, the trade-off with network costs usually makes it very worthwhile. Compression using gzipĪn easy and convenient way to reduce the bandwidth needed for each request is to enable gzip compression. However, the same concepts are applicable to the Drive API. In some cases, examples from other APIs or generic APIs are used to illustrate the ideas presented. This document covers some techniques you can use to improve the performance of your application.
0 Comments
Leave a Reply. |