Replies: 3 comments
|
Body updated with a concrete scope: request-body compression (gzip/deflate via |
0 replies
|
Implemented in #275 — |
0 replies
|
Superseded by #342 — the design here ( |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Overview
Payload Compression means compressing the outgoing request body before it's sent over the wire (e.g. gzip), and setting
Content-Encodingaccordingly. This is distinct from the decompression support that already exists in the package (Session.disableDecompression()/Session.decompressionLimit(_:)), which only handles decompressing responses — a feature already provided natively by AsyncHTTPClient.Scope
Sessionmethod (mirroringdecompressionLimit(_:)) to enable request-body compression, e.g.Session.compression(_:), backed byNIOHTTPRequestCompressorfromswift-nio-extras(already a transitive dependency, already used on the decompression side).NIOHTTPRequestCompressoralready implements, matching what response decompression already supports.Content-Encodingautomatically based on the chosen algorithm.Payloadsource produced it (Data/JSON/String/File/Form/the upcomingPayloadEncoderfrom Feature Proposal: Payload Encoding #196) — compression (Content-Encoding, a byte transform) and payload encoding (Content-Type, value serialization) are orthogonal, per the Feature Proposal: Payload Encoding #196 scope decision.Out of scope
NIOHTTPRequestCompressortoday.Milestone: 4.1.0.
All reactions