Documentation
¶
Index ¶
Constants ¶
View Source
const (
// FormatHeader name of the header used to extract the format.
FormatHeader = "X-Format"
)
Variables ¶
This section is empty.
Functions ¶
func RespondWithErrorPage ¶
func SetClientFormat ¶
func SetClientFormat(writer http.ResponseWriter, t ContentType)
Types ¶
type ContentType ¶
type ContentType = byte
const ( UnknownContentType ContentType = iota // should be first JSONContentType HTMLContentType PlainTextContentType )
func ClientWantFormat ¶
func ClientWantFormat(req *http.Request) ContentType
Click to show internal directories.
Click to hide internal directories.