Skip to content
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

Golang | http.Flusher interface #84

Open
atc0005 opened this issue Jun 27, 2020 · 0 comments
Open

Golang | http.Flusher interface #84

atc0005 opened this issue Jun 27, 2020 · 0 comments
Labels

Comments

@atc0005
Copy link
Owner

atc0005 commented Jun 27, 2020

type Flusher interface {
    // Flush sends any buffered data to the client.
    Flush()
}

The Flusher interface is implemented by ResponseWriters that allow an HTTP handler to flush buffered data to the client.

The default HTTP/1.x and HTTP/2 ResponseWriter implementations support Flusher, but ResponseWriter wrappers may not. Handlers should always test for this ability at runtime.

Note that even for ResponseWriters that support Flush, if the client is connected through an HTTP proxy, the buffered data may not reach the client until the response completes.

@atc0005 atc0005 added the golang label Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant