Socket
Book a DemoInstallSign in
Socket

flowhttp-status

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flowhttp-status

A flowHttp extension used for whitelisting HTTP status codes

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

flowHttp-status

A flowHttp extension used for whitelisting HTTP status codes.

build
status

Install

npm install flowhttp-status

Usage

Use this module to create a PassThrough stream that will emit an error event if the response from the flowHttp module doesn't validate against a specified whitelist of HTTP status codes.

E.g. only allow the two HTTP status codes 200 and 204. If the GET request for example.com returns anything other than those two status codes, an error event will be emitted on the stream:

var flowHttp = require('flowhttp');
var ValidCodes = require('flowhttp-status');

flowHttp('http://example.com')
  .pipe(new ValidCodes(200, 204))
  .pipe(process.stdout);

License

MIT

Keywords

flowhttp

FAQs

Package last updated on 29 Aug 2014

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