append-header

0.0.1 • Public • Published

append-header

Extends a response object with an appendHeader method.

Usage

var app = require('express')()
require('append-header')(app.response)
 
app.use(express.compress())
app.use(function (req, res, next) {
  res.appendHeader('Vary', 'Accept-Language')
  next()
})

The server response will now have a Vary header set to Accept-Encoding, Accept-Language.

Extending all HTTP response objects

var http = require('http')
require('append-header')(http.ServerResponse.prototype)

Install

$ npm install append-header

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i append-header

      Weekly Downloads

      1

      Version

      0.0.1

      License

      MIT

      Last publish

      Collaborators

      • tellnes