Documentation
¶
Overview ¶
Package accept provides functions for handling HTTP content negotiation headers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header []MediaRange
A Header represents a set of media ranges as sent in the Accept header of an HTTP request.
http://tools.ietf.org/html/rfc2616#section-14.1
func ParseHeader ¶
ParseHeader parses an Accept header of an HTTP request. The media ranges are unsorted.
type MediaRange ¶
A MediaRange represents a set of MIME types as sent in the Accept header of an HTTP request.
func (*MediaRange) Match ¶
func (mr *MediaRange) Match(contentType string, params map[string]string) bool
Match reports whether the range applies to a content type.
func (*MediaRange) String ¶
func (mr *MediaRange) String() string
Click to show internal directories.
Click to hide internal directories.