Helpers for implementing http.Handlers
Response Handlers
Using respond.WithRequest() we compute our options and PreferredContentType()
tells one how to encode the data.
Content Negotiation
QualityList
The QualityList parser allows choosing the best option during Content Negotiation, e.g. accepted Content-Types.
BestQuality
qlist offers two helpers to choose the best option from a QualityList and a list of
supported options, BestQuality() and BestQualityWithIdentity(). Identity is an special
option we consider unless it's explicitly forbidden.
BestEncoding
qlist.BestEncoding() is a special case of BestQualityWithIdentity() using the Accept
header, and falling back to "identity" as magic type.
See also