Skip to content

Add request/response compression support (gzip, deflate, brotli) #31

Description

@tw4

Summary

Nexar does not currently configure HTTP compression. This means responses are not automatically decompressed and the Accept-Encoding header is not sent, resulting in larger payloads and slower performance.

Problem

  • No Accept-Encoding: gzip, deflate, br header is sent by default
  • Compressed responses from servers are not automatically decompressed
  • Increased bandwidth usage and slower response times

Proposed Solution

Configure the underlying HttpClientHandler to enable automatic decompression and optionally add compression support for request bodies.

var handler = new HttpClientHandler
{
    AutomaticDecompression = DecompressionMethods.GZip
                           | DecompressionMethods.Deflate
                           | DecompressionMethods.Brotli
};

Expose a configuration option in NexarConfig to enable/disable this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions