Skip to content

Comments

chore: [JS] Document Request Compression Middleware#2369

Draft
davidkna-sap wants to merge 5 commits intomainfrom
davidkna-sap_doc-http-compress
Draft

chore: [JS] Document Request Compression Middleware#2369
davidkna-sap wants to merge 5 commits intomainfrom
davidkna-sap_doc-http-compress

Conversation

@davidkna-sap
Copy link
Member

What Has Changed?

Explain what you are changing and why, if it isn't obvious from the diff.

Related: https://github.com/SAP/ai-sdk-js-backlog/issues/470
Requires: SAP/cloud-sdk-js#6291

@davidkna-sap davidkna-sap force-pushed the davidkna-sap_doc-http-compress branch from 276240a to a779e91 Compare February 2, 2026 13:42
Copy link
Contributor

@BrigittaK307 BrigittaK307 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides that one small suggestion, it looks good to me.

:::

The SAP Cloud SDK provides a [`compressRequest()`](pathname:///api/v4/functions/sap-cloud-sdk_http-client.compressRequest.html) middleware to compress HTTP request payloads using a selected compression algorithm.
This can reduce bandwidth usage and improve performance when sending large payloads to remote APIs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nth] Consider also mentioning the tradeoff between compression overhead and bandwith reduction. Compression might be worse for small payloads.
This also is a good motivation for the "auto" mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants