Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseWriterProxier ¶
type ResponseWriterProxier interface { http.ResponseWriter // StatusCode returns the HTTP status of the request, or 0 if // one has not yet been sent or if the connection was hijacked. StatusCode() int // HeadersWritten indicates whenever the response headers // were already written or not. HeadersWritten() bool // BytesWritten returns the total number of bytes sent to the // client so far. BytesWritten() int // Hijacked indicates whenever the connection was hijacked or not. Hijacked() bool // Unwrap returns the original proxied http.ResponseWriter. Unwrap() http.ResponseWriter }
ResponseWriterProxier wraps a http.ResponseWriter and allows it to be inspected by middlewares.
func NewResponseProxy ¶
func NewResponseProxy(w http.ResponseWriter) ResponseWriterProxier
Click to show internal directories.
Click to hide internal directories.