Attributes
- Companion
- class
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MediaRange.type
Members list
Value members
Concrete methods
Given a list of acceptable media ranges, find the preferred media type in the list of available media types.
Given a list of acceptable media ranges, find the preferred media type in the list of available media types.
Note: the media types in the list should be without parameters, e.g. text/html not text/html;charset=utf-8
Attributes
Implicits
Implicits
Ordering for MediaRanges, in order of highest priority to lowest priority.
Ordering for MediaRanges, in order of highest priority to lowest priority.
The reason it is highest to lowest instead of lowest to highest is to ensure sorting is stable, so if two media ranges have the same ordering weight, they will not change order.
Ordering rules for MediaRanges:
First compare by qValue, default to 1. Higher means higher priority. Then compare the media type. If they are not the same, then the least specific (ie, if one is *) has a lower priority, otherwise if they have same priority. Then compare the sub media type. If they are the same, the one with the more parameters has a higher priority. Otherwise the least specific has the lower priority, otherwise they have the same priority.