Skip to content

Commit

Permalink
updated example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
einaros committed Aug 27, 2012
1 parent 49d122f commit 36074db
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -8,6 +8,20 @@ Simple rate limiting for node.js streams, capable of capping both read and write


# Usage # Usage


## http (see examples/http for a more elaborate example)

var http = require('http')
, ratelimit = require('../../');

http.get('http://someplace.com/path/file.zip', function(res) {
var limit = ratelimit(res, 65 * 1024);
res.on('data', function(data) {
// do whatever with data
});
});

## other examples

See the tests for now. See the tests for now.


# Todo # Todo
Expand Down

0 comments on commit 36074db

Please sign in to comment.