RequestEntitySyntax

endpoints4s.algebra.Requests.RequestEntitySyntax
implicit class RequestEntitySyntax[A](requestEntity: RequestEntity[A])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

final def orElse[B](otherRequestEntity: RequestEntity[B]): RequestEntity[Either[A, B]]

Alternative between two possible request entities, differentiated by the Content-Type header

Alternative between two possible request entities, differentiated by the Content-Type header

Attributes

Note

If A and B are both JSON-encoded and use disjoint schemas, use endpoints4s.algebra.JsonSchemas.TaggedOps#orElse at the schema level instead

  • Server interpreters accept either of the request entities
  • Client interpreters provide one of the two request entities
  • Documentation interpreters list all possible content types and their entities