Packages

c

akka.http.scaladsl.server

CharsetNegotiator

final class CharsetNegotiator extends AnyRef

Source
ContentNegotation.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CharsetNegotiator
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CharsetNegotiator(requestHeaders: Seq[HttpHeader])

Value Members

  1. val acceptedCharsetRanges: List[HttpCharsetRange]

    The charset-ranges accepted by the client according to given request headers, sorted by 1.

    The charset-ranges accepted by the client according to given request headers, sorted by 1. increasing generality (i.e. most specific first) 2. decreasing q-value (only for ranges targeting a single HttpCharset) 3. order of appearance in the Accept-Charset header(s)

  2. def isAccepted(charset: HttpCharset): Boolean

    Determines whether the given charset is accepted by the client.

  3. def pickBest: Option[HttpCharset]

    Picks the charset that is most preferred by the client with a bias towards UTF-8, i.e.

    Picks the charset that is most preferred by the client with a bias towards UTF-8, i.e. if the client accepts all charsets with equal preference then UTF-8 is picked. If the client doesn't accept any charsets the method returns None.

    See also: http://tools.ietf.org/html/rfc7231#section-5.3.3

  4. def qValueFor(charset: HttpCharset): Float

    Returns the q-value that the client (implicitly or explicitly) attaches to the given charset.

    Returns the q-value that the client (implicitly or explicitly) attaches to the given charset. See http://tools.ietf.org/html/rfc7231#section-5.3.1 for details.