src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

doc.go (1026B)


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