Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Accept ¶
type Accept struct {
// contains filtered or unexported fields
}
Accept represents an Accept, Accept-Language or Accept-Encoding header.
func NewAccept ¶
NewAccept parses an Accept: header and returns an Accept object which can be used to carry out content negotiation.
func NewAcceptEncoding ¶
NewAccept parses an Accept-Encoding: header and returns an Accept object which can be used to carry out content negotiation.
func NewAcceptLanguage ¶
NewAccept parses an Accept-Language: header and returns an Accept object which can be used to carry out content negotiation.
type AcceptValue ¶
type AcceptValue struct { Value string // The acceptable value Params map[string]string // Any pre-Q parameters (part of the value) Ext map[string]string // Any additional post-Q parameters (not part of the value) Q float64 // The q= value Specificity int // The specificity of this value, used as a tie-breaker when Q values are equal }
AcceptValue represents an individual clause from an Accept header.
Click to show internal directories.
Click to hide internal directories.