question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Add flush method

See original GitHub issue

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Add a way to flush a response immediately without compressing.

Motivation

I’m attempting to migrate storybook’s dev server from express to fastify, but I’m by no means very familiar with fastify. I found that they have been using a res.flush() method which comes from express’ compression middleware (https://www.npmjs.com/package/compression/v/1.2.1).

Is there already a way to do this in fastify? I wasn’t able to find one.

Example

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
IanVScommented, Jul 23, 2022

OK thanks for the quick response!

0reactions
mcollinacommented, Jul 23, 2022

No worries!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writer flush() method in Java with Examples - GeeksforGeeks
The flush() method of Writer Class in Java is used to flush the writer. By flushing the writer, it means to clear the...
Read more >
Flush Method - ActiveX Data Objects (ADO) - Microsoft Learn
This method may be used to send the contents of the stream buffer to the underlying object (for example, the node or file...
Read more >
Feature request - Flush method · Issue #142 - GitHub
We've had some problems with message ordering where the solution from Segment support has been to flush after each identify call (also ...
Read more >
How does the flush method work? - android - Stack Overflow
Flushing simply asks a stream to "write" whatever content has been "cached" so far. You see, most streams do not "write" immediately when...
Read more >
flush - Angular
Flushes any pending microtasks and simulates the asynchronous passage of time for the timers in the fakeAsync zone by draining the macrotask queue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found