Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@medley/etag

0.1.0 • Public • Published

@medley/etag

npm Version Build Status Coverage Status dependencies Status

Medley plugin for automatic ETag generation & conditional GET responses.

Generates an ETag header for string and Buffer response bodies and sends a 304 Not Modified response if the ETag matches the incoming If-None-Match header.

Installation

npm install @medley/etag
# or 
yarn add @medley/etag

Usage

const medley = require('@medley/medley');
const app = medley();
 
app.register(require('@medley/etag'));
 
app.get('/', (req, res) => {
  res.send('Hello World');
});
 
app.listen(3000);

Install

npm i @medley/etag

DownloadsWeekly Downloads

5

Version

0.1.0

License

MIT

Unpacked Size

4.05 kB

Total Files

4

Last publish

Collaborators

  • avatar