Tries to match the given type to the given preferences. In case there are multiple matches the most specific one will be chosen as per RFC 7231.
The corresponding weight from the preferences or 0 if there is no match.
Type for which the matching weight is needed.
Preferences to match the type to.
Tries to match the given type to the given preferences. In case there are multiple matches the most specific one will be chosen as per RFC 7231.
Returns
The corresponding weight from the preferences or 0 if there is no match.