Documentation ¶
Overview ¶
Package conneg provides HTTP content negotiation support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMatchNotFound = errors.New("no matching media type found")
ErrMatchNotFound indicates that a matching media type was not available. This error corresponds to a HTTP 406 Not Acceptable status code.
Functions ¶
Types ¶
type MediaType ¶
type MediaType struct {
// contains filtered or unexported fields
}
MediaType represents a media type as per [RFC 1521].
[RFC 1521]:https://www.rfc-editor.org/rfc/rfc1521.html
func ParseContentType ¶
ParseContentType parses a content-type into a slice of media types.
Click to show internal directories.
Click to hide internal directories.