urlencode-stream
A streams2 Transform stream that urlencodes the text piped through it.
Last updated 7 years ago by othiym23 .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install urlencode-stream 
SYNC missed versions from official npm registry.

You need to URL encode a stream you're sending to a web server somewhere. You want this:

var fs = require('fs');
var request = require('request');
var URLEncodeStream = require('urlencode-stream');
var handler = require('./response-handler');


fs.createReadStream('./sample-data.txt')
  .pipe(new URLEncodeStream())
  .pipe(request('http://example.com/postme', handler));

Depends on streams2, one way or another. If you're running 0.10.x, it'll use the built-in streams. If you're running Node 0.8.x, it'll use readable-stream. If you're running an earlier Node, you're outta luck, chum. Maybe it's time to upgrade?

Current Tags

  • 1.1.0                                ...           latest (7 years ago)

3 Versions

  • 1.1.0                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |