Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOptionsHandler ¶
func CreateOptionsHandler(methods ...string) http.HandlerFunc
CreateOptionsHandler creates a generic options handler that takes a list of allowed methods.
func HeadHandler ¶ added in v1.1.14
func HeadHandler(next http.Handler) http.HandlerFunc
HeadHandler returns a handler that prevents a body from being returned for any wrapped request handler if the HTTP method is HEAD.
Types ¶
type ContextAware ¶ added in v1.1.53
type ContextRecorder ¶ added in v1.1.53
type ContextRecorder interface { ContextAware RecorderAware }
type HeadResponseWriter ¶ added in v1.1.14
type HeadResponseWriter struct { Bytes int StatusCode int // contains filtered or unexported fields }
HeadResponseWriter captures input to an http.ResponseWriter
func (*HeadResponseWriter) Header ¶ added in v1.1.14
func (w *HeadResponseWriter) Header() http.Header
Header proxies http.ResponseWriter Header
func (*HeadResponseWriter) Write ¶ added in v1.1.14
func (w *HeadResponseWriter) Write(b []byte) (int, error)
Write prevents http.ResponseWriter Write from writing anything to the response body for HEAD requests.
func (*HeadResponseWriter) WriteHeader ¶ added in v1.1.14
func (w *HeadResponseWriter) WriteHeader(statusCode int)
WriteHeader proxies http.ResponseWriter WriteHeader
type RecorderAware ¶ added in v1.1.53
Click to show internal directories.
Click to hide internal directories.