You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

buffered-response

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffered-response

Utility library for line-by-line reading from any readable text stream

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
11
450%
Maintainers
1
Weekly downloads
 
Created
Source

Buffered Response Reader for Node.js

A small utility class to wrap response objects from the http module, and provide line-by-line iteration.

SYNOPSIS

    var http = require('http');
    var BufferedResponse = require('buffered-response').BufferedResponse;

    var options = {
        host: 'foo',
        path: '/a/b?q=3',
        method: 'GET'
    };

    var req = http.request(options, function(resp) {
        var reader = new BufferedResponse(resp);
        reader.setEncoding('utf8');
        var lineno = 1;
        reader.on('line', function(line) {
            console.log("LINE " + lineno++ + ": " + line);
        });
    });

    req.end();

CHANGELOG

0.0.1 Intial version 0.0.2 (Thu Nov 8 16:43:50 GMT 2012): Moved from jquery-deferred to underscore-deferred. 0.0.3 (Sun Nov 11 16:33:20 GMT 2012): Allow null values to be passed in as callbacks (they are ignored). 0.0.4 ..: Also ignore null filters 0.0.5 (Sun Nov 11 23:10:35 GMT 2012): Wrap all callbacks in try-catch.

Keywords

javascript

FAQs

Package last updated on 11 Nov 2012

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