@medley/etag
v0.1.0
Published
Medley plugin for automatic ETag generation & conditional GET responses
Downloads
3
Maintainers
Readme
@medley/etag
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);