Documentation
¶
Overview ¶
Package httputil provides HTTP utility functions, complementing the most common ones in package net/http.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindResponseWriter ¶
BindResponseWriter catches a downstream response writing and transfer its content to the writer w (that will normally take care to use the original ResponseWriter). The before variadic is a set of functions that will be triggered just before writing the response.
func ResponseStatus ¶
func ResponseStatus(w http.ResponseWriter) int
ResponseStatus returns the HTTP response status. Remember that the status is only set by the server after WriteHeader has been called.
func SetDetectedContentType ¶
func SetDetectedContentType(w http.ResponseWriter, p []byte) string
SetDetectedContentType detects, sets and returns the response Conten-Type header value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.