Class MediaTypeNegotiator
java.lang.Object
org.apache.pekko.http.scaladsl.server.MediaTypeNegotiator
-
Constructor Summary
ConstructorsConstructorDescriptionMediaTypeNegotiator(scala.collection.immutable.Seq<HttpHeader> requestHeaders) -
Method Summary
Modifier and TypeMethodDescriptionscala.collection.immutable.List<MediaRange>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 theAcceptheader(s)booleanisAccepted(MediaType mediaType) Determines whether the givenpekko.http.scaladsl.model.MediaTypeis accepted by the client.floatReturns the q-value that the client (implicitly or explicitly) attaches to the given media-type.
-
Constructor Details
-
MediaTypeNegotiator
-
-
Method Details
-
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 theAcceptheader(s)- Returns:
- (undocumented)
-
isAccepted
Determines whether the givenpekko.http.scaladsl.model.MediaTypeis accepted by the client.- Parameters:
mediaType- (undocumented)- Returns:
- (undocumented)
-
qValueFor
Returns the q-value that the client (implicitly or explicitly) attaches to the given media-type. See http://tools.ietf.org/html/rfc7231#section-5.3.1 for details.- Parameters:
mediaType- (undocumented)- Returns:
- (undocumented)
-