Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header represents an HTTP Accept header value See https://httpwg.org/specs/rfc9110.html#field.accept
func FromString ¶
func (Header) FirstChoice ¶
func (h Header) FirstChoice() *PreferredType
type PreferredType ¶
type PreferredType struct {
// ContentType is a singular media type (e.g. text/plain), or one partially containing
// wildcards (e.g. text/*), or entirely wildcards (e.g. */*)
ContentType string
// Parameters is a map of media type parameters, e.g. charset=utf-8
Parameters map[string]string
// Weight is the integer-normalized quality value representing the relative weight/preference
Weight qValue
}
func (PreferredType) String ¶
func (t PreferredType) String() string
Click to show internal directories.
Click to hide internal directories.