-
-
Notifications
You must be signed in to change notification settings - Fork 239
Flush alias #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flush alias #74
Conversation
This would help me as well - any feedback on this @dougwilson? |
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(); } ``` Currently the `res` object has a `flush` method regardless of whether compression middleware is installed. The built-in `flush` method issues a noisy deprecation warning. This patch provides an alias for the `flush` method to allow detection of the compression middleware's `flush`. This addresses expressjs#72.
This would be nice. Any chance of a quick review, @dougwilson? |
|
d7bb81b
to
cd957aa
Compare
I'm not sure about adding this property, I'll ping on Slack in case anyone has feedback to share. cc: @expressjs/express-tc |
.flush is no longer a method on HTTP OutgoingMessage, so this method is no longer needed https://nodejs.org/api/deprecations.html#dep0001-httpoutgoingmessageprototypeflush |
Hi,
This adds
res.flushCompression()
as an alias forres.flush()
This supports use such as:
Currently the
res
object has aflush
method regardless of whether compression middleware is installed. The built-inflush
method issues a noisy deprecation warning. This patch provides an alias for theflush
method to allow detection of the compression middleware'sflush
.This addresses #72.
Thanks,
Bo