Skip to content

Commit

Permalink
Add reminder to do something with res.
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Jul 29, 2013
1 parent 01919bf commit f7c0245
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ usage:

```js
client.putFile('my.json', '/user.json', function(err, res){
// Logic
// Always either do something with `res` or at least call `res.resume()`.
});
```

Expand All @@ -75,7 +75,7 @@ http.get('https://google.com/doodle.png', function(res){
, 'Content-Type': res.headers['content-type']
};
client.putStream(res, '/doodle.png', headers, function(err, res){
// Logic
// check `err`, then do `res.pipe(..)` or `res.resume()` or whatever.
});
});
```
Expand All @@ -95,7 +95,7 @@ fs.stat('./Readme.md', function(err, stat){
fs.createReadStream('./Readme.md').pipe(req);

req.on('response', function(res){
// Logic
// ...
});
});
```
Expand All @@ -109,7 +109,7 @@ var headers = {
'Content-Type': 'text/plain'
};
client.putBuffer(buffer, '/string.txt', headers, function(err, res){
// Logic
// ...
});
```

Expand Down Expand Up @@ -139,7 +139,7 @@ you the raw request:

```js
client.getFile('/test/Readme.md', function(err, res){
// Logic
// check `err`, then do `res.pipe(..)` or `res.resume()` or whatever.
});
```

Expand All @@ -159,7 +159,7 @@ flexible) solution:

```js
client.deleteFile('/test/Readme.md', function(err, res){
// Logic
// check `err`, then do `res.pipe(..)` or `res.resume()` or whatever.
});
```

Expand Down

0 comments on commit f7c0245

Please sign in to comment.