Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrHijackUnsupported = errors.New("the ResponseWriter doesn't support the Hijacker interface")
)
Functions ¶
func ChainFunc ¶
func ChainFunc(hf http.HandlerFunc, ff ...func(http.HandlerFunc) http.HandlerFunc) http.HandlerFunc
ChainFunc applies middlewares to a http.HandlerFunc
Types ¶
type ResponseWriter ¶
type ResponseWriter interface {
http.ResponseWriter
http.Flusher
// Status returns the status code of the response or 0 if the response has not been written.
Status() int
// Written returns whether or not the ResponseWriter has been written.
Written() bool
// Size returns the size of the response body.
Size() int
Unwrap() http.ResponseWriter
// Tee allows the caller to write to multiple writers.
Tee(w io.Writer)
}
func Wrap ¶
func Wrap(w http.ResponseWriter, r *http.Request) ResponseWriter
Wrap http.ResponseWriter into a ResponseWriter.
Click to show internal directories.
Click to hide internal directories.