MCPcopy Create free account
hub / github.com/Effect-TS/effect / compressedBody

Function compressedBody

packages/platform/node/src/NodeHttpPlatform.ts:28–32  ·  view source on GitHub ↗
(
  response: ServerResponse.HttpServerResponse,
  body: HttpBody.HttpBody
)

Source from the content-addressed store, hash-verified

26// replaces the response body while keeping every other field, dropping the
27// now-stale Content-Length header
28const compressedBody = (
29 response: ServerResponse.HttpServerResponse,
30 body: HttpBody.HttpBody
31): ServerResponse.HttpServerResponse =>
32 ServerResponse.removeHeader(ServerResponse.setBody(response, body), "content-length")
33
34const compression = NodeHttpCompression.make({
35 algorithms: NodeHttpCompression.algorithms,

Callers 1

compressResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected