Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

http-ndjson

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-ndjson

Log http requests as ndjson

Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
646
308.86%
Maintainers
1
Weekly downloads
 
Created
Source

http-ndjson

NPM version build status Test coverage Downloads js-standard-style

Log http requests as ndjson.

Installation

$ npm install http-ndjson

Usage

const httpNdjson = require('http-ndjson')
const http = require('http')

http.createServer((req, res) => {
  httpNdjson(req, res).pipe(process.stdout)
  res.end()
}).listen()
{ name: 'http', message: '<-- GET', url: '/' }
{ name: 'http', message: '--> GET', url: '/', statusCode: 200, elapsed: '5ms' }

API

writeStream = httpNdjson(req, res)

Create an http logger. Returns a write stream.

See Also

  • bole
  • garnish
  • ndjson

License

MIT

Keywords

http

FAQs

Package last updated on 19 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts