Skip to content

rill-js/etag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rill
@rill/etag
API stability Standard NPM version Downloads Gitter Chat

Automatically generate ETag http headers for responses with Rill.

Installation

npm install @rill/etag

Example

const rill = require('rill')
const app = rill()
const fresh = require('@rill/fresh')
const etag = require('@rill/etag')

// ETag works together with fresh
app.use(fresh())
app.use(etag())

// Response will be sent with ETag header.
app.use((ctx, next) => {
  this.body = 'Hello World'
})

app.listen(3000)

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!

About

🏷 Add ETag header to Rill responses.

Resources

Stars

Watchers

Forks

Packages

No packages published