doc.go 1.0 KB

12345678910111213141516171819202122
  1. /*
  2. Package acceptencoding provides customizations associated with Accept Encoding Header.
  3. # Accept encoding gzip
  4. The Go HTTP client automatically supports accept-encoding and content-encoding
  5. gzip by default. This default behavior is not desired by the SDK, and prevents
  6. validating the response body's checksum. To prevent this the SDK must manually
  7. control usage of content-encoding gzip.
  8. To control content-encoding, the SDK must always set the `Accept-Encoding`
  9. header to a value. This prevents the HTTP client from using gzip automatically.
  10. When gzip is enabled on the API client, the SDK's customization will control
  11. decompressing the gzip data in order to not break the checksum validation. When
  12. gzip is disabled, the API client will disable gzip, preventing the HTTP
  13. client's default behavior.
  14. An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using
  15. the below middleware. The option if present can be used to enable auto decompressing
  16. gzip by the SDK.
  17. */
  18. package acceptencoding