akka.http.scaladsl.unmarshalling
Order of parameters (right
first, left
second) is intentional, since that's the order we evaluate them in.
Signals that unmarshalling failed because the entity content-type did not match one of the supported ranges.
Signals that unmarshalling failed because the entity content-type did not match one of the supported ranges.
This error cannot be thrown by custom code, you need to use the forContentTypes
modifier on a base
akka.http.scaladsl.unmarshalling.Unmarshaller instead.
Signals that unmarshalling failed because the entity was unexpectedly empty.
Creates an Unmarshaller
from the given function.
Returns the best charset for unmarshalling the given entity to a character-based representation.
Returns the best charset for unmarshalling the given entity to a character-based representation. Falls back to UTF-8 if no better alternative can be determined.
Enables using Either to encode the following unmarshalling logic:
Attempt unmarshalling the entity as as R
first (yielding R
),
and if it fails attempt unmarshalling as L
(yielding Left
).
Enables using Either to encode the following unmarshalling logic:
Attempt unmarshalling the entity as as R
first (yielding R
),
and if it fails attempt unmarshalling as L
(yielding Left
).
Note that the Either's "R" type will be attempted first (as Left is often considered as the "failed case" in Either).
Helper for creating a "super-unmarshaller" from a sequence of "sub-unmarshallers", which are tried in the given order.
Helper for creating a "super-unmarshaller" from a sequence of "sub-unmarshallers", which are tried in the given order. The first successful unmarshalling of a "sub-unmarshallers" is the one produced by the "super-unmarshaller".
Helper for creating a synchronous Unmarshaller
from the given function.