Documentation ¶
Overview ¶
Package negotiation provides utilities for working with HTTP client- driven content negotiation. It provides a zero-allocation utility for determining the best content type for the server to encode a response.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectQValue ¶
SelectQValue selects and returns the best value from the allowed set given a header with optional quality values, as you would get for an Accept or Accept-Encoding header. The *first* item in allowed is preferred if there is a tie. If nothing matches, returns an empty string.
func SelectQValueFast ¶
SelectQValueFast is a faster version of SelectQValue that does not need any dynamic memory allocations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.