Skip to content

Commit

Permalink
Add flushCompression() to README with example use
Browse files Browse the repository at this point in the history
  • Loading branch information
gigabo committed Jun 27, 2016
1 parent 14cdf4f commit 1321557
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -160,6 +160,20 @@ function shouldCompress(req, res) {
This module adds a `res.flush()` method to force the partially-compressed
response to be flushed to the client.

### res.flushCompression

This is an alias for the `res.flush()` method that is added by this module.

This supports use such as:

```javascript
// Not going to write again for a while. If compression middleware is
// installed let's tell it to flush what we've got through to the client.
if (res.flushCompression) {
res.flushCompression();
}
```

## Examples

### express/connect
Expand Down

0 comments on commit 1321557

Please sign in to comment.