-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
http.Flusher implementation #215
Labels
enhancement
Enhancement of existing feature
Comments
System-Glitch
added a commit
that referenced
this issue
Jul 12, 2024
- Response implement http.Flusher - Call PreWrite only once on the first Write - Add CommonWriter to reduce chained writers boilerplate - Use CommonWriter for log and compress middleware
System-Glitch
added a commit
that referenced
this issue
Jul 12, 2024
- Response implement http.Flusher - Call PreWrite only once on the first Write - Add CommonWriter to reduce chained writers boilerplate - Use CommonWriter for log and compress middleware
System-Glitch
added a commit
that referenced
this issue
Jul 12, 2024
- Response implement http.Flusher - Call PreWrite only once on the first Write - Add CommonWriter to reduce chained writers boilerplate - Use CommonWriter for log and compress middleware
System-Glitch
added a commit
that referenced
this issue
Jul 15, 2024
- Response implement http.Flusher - Call PreWrite only once on the first Write - Add CommonWriter to reduce chained writers boilerplate - Use CommonWriter for log and compress middleware
System-Glitch
added a commit
that referenced
this issue
Jul 23, 2024
Response: add support for flushing #215 - Response implement http.Flusher - Add goyave.Flusher interface - Call PreWrite only once on the first Write - Add CommonWriter to reduce chained writers boilerplate - Use CommonWriter for log and compress middleware
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal
*goyave.Response
and built-in chained writers don't implementhttp.Flusher
. This makes it difficult for streamed responses for example. Having more options is always a good thing.We would need to be cautious implementing this in regards to the compression middleware. We'd have to make encoders still work properly when flushing.
Additional suggestion: chained writers are becoming more verbose because of the need to support multiple interfaces such as
goyave.PreWriter
,io.Closer
and nowhttp.Flusher
. It would be a convenient improvement to provide aBaseWriter
(orCommonWriter
) to use with composition and that implements a proper default behavior for all these interfaces.Chained writers docs.
The text was updated successfully, but these errors were encountered: