0.1.0 • Published 6 years ago
@medley/etag v0.1.0
@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/etagUsage
const medley = require('@medley/medley');
const app = medley();
app.register(require('@medley/etag'));
app.get('/', (req, res) => {
res.send('Hello World');
});
app.listen(3000);0.1.0
6 years ago