on-head
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

on-head

Hook before http response send head

Install

npm i on-head

Usage

import Express from 'express';

const app = Express();
app.use((req, res, next) => {
  onHead(res, () => {
    // You still can modify response headers
    res.setHeader('tracer-id', '1234');
  });
  next();
});

Package Sidebar

Install

npm i on-head

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

13.3 kB

Total Files

13

Last publish

Collaborators

  • edvardchen