public final class MediaTypeNegotiator
extends java.lang.Object
Constructor and Description |
---|
MediaTypeNegotiator(scala.collection.immutable.Seq<HttpHeader> requestHeaders) |
Modifier and Type | Method and Description |
---|---|
scala.collection.immutable.List<MediaRange> |
acceptedMediaRanges()
The media-ranges accepted by the client according to the given request headers, sorted by
1. increasing generality (i.e. most specific first)
2. decreasing q-value (only for ranges targeting a single MediaType)
3. order of appearance in the
Accept header(s) |
boolean |
isAccepted(MediaType mediaType)
Determines whether the given
pekko.http.scaladsl.model.MediaType is accepted by the client. |
float |
qValueFor(MediaType mediaType)
Returns the q-value that the client (implicitly or explicitly) attaches to the given media-type.
|
public MediaTypeNegotiator(scala.collection.immutable.Seq<HttpHeader> requestHeaders)
public scala.collection.immutable.List<MediaRange> acceptedMediaRanges()
Accept
header(s)public boolean isAccepted(MediaType mediaType)
pekko.http.scaladsl.model.MediaType
is accepted by the client.mediaType
- (undocumented)public float qValueFor(MediaType mediaType)
mediaType
- (undocumented)