SAP Cloud SDK for JavaScript - v4.5.1
    Preparing search index...

    Interface RequestCompressionMiddlewareOptions<C>

    Configuration for the request compression middleware.

    interface RequestCompressionMiddlewareOptions<
        C extends RequestCompressionAlgorithm = "gzip",
    > {
        algorithm?: C;
        autoCompressMinSize?: number;
        compressOptions?: RequestCompressorOptions[C];
        mode?: "never" | "auto" | "header-only" | "always";
    }

    Type Parameters

    Index

    Properties

    algorithm?: C

    The algorithm to compress the payload with. Please note that not all servers support all algorithms.

    'gzip'
    
    autoCompressMinSize?: number

    Minimum size in bytes a payload must have to be compressed in 'auto' mode.

    1024
    
    compressOptions?: RequestCompressorOptions[C]

    Options for the chosen compression algorithm, e.g. to control the compression effort.

    mode?: "never" | "auto" | "header-only" | "always"

    Compression mode.

    • 'auto' - The payload is compressed based on the autoCompressMinSize threshold.
    • 'header-only' - It is assumed that the payload is already compressed. The middleware will only set the appropriate Content-Encoding header without modifying the payload.
    • 'always' - The payload will always be compressed.
    • never' - The payload will never be compressed.
    'auto'
    

    Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.