1.0.0 • Published 5 years ago

popsicle-content-encoding v1.0.0

Weekly downloads
36,028
License
MIT
Repository
github
Last release
5 years ago

Popsicle Content Encoding

NPM version NPM downloads Build status Test coverage

Popsicle middleware for supporting Content-Encoding compression.

Installation

npm install popsicle-content-encoding --save

Usage

import { contentEncoding } from "popsicle-content-encoding";

const middleware = compose([contentEncoding(), transport()]);

Automatically populates Accept-Encoding based on node.js supported decompression algorithms, then decodes the matching response body. Does nothing if Accept-Encoding is already set.

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

MIT