Trait

endpoints.algebra

Responses

Related Doc: package algebra

Permalink

trait Responses extends StatusCodes with InvariantFunctorSyntax

Self Type
Responses with Errors
Source
Responses.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Responses
  2. InvariantFunctorSyntax
  3. StatusCodes
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class InvariantFunctorSyntax[A, F[_]] extends AnyRef

    Permalink

    Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

    Extension methods for values of type F[A] for which there is an implicit InvariantFunctor[F] instance.

    Definition Classes
    InvariantFunctorSyntax
  2. abstract type Response[A]

    Permalink

    An HTTP response (status, headers, and entity) carrying an information of type A

  3. abstract type ResponseEntity[A]

    Permalink

    An HTTP response entity carrying an information of type A

  4. implicit class ResponseSyntax[A] extends AnyRef

    Permalink

    Extension methods for Response.

  5. abstract type StatusCode

    Permalink

    HTTP Status Code

    HTTP Status Code

    Definition Classes
    StatusCodes

Abstract Value Members

  1. abstract def Accepted: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  2. abstract def BadRequest: (Responses.this)#StatusCode

    Permalink

    Definition Classes
    StatusCodes
    Note

    You should use the badRequest constructor provided by the Responses trait to ensure that errors produced by endponits are consistently handled by interpreters.

  3. abstract def Created: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  4. abstract def Forbidden: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  5. abstract def InternalServerError: (Responses.this)#StatusCode

    Permalink

    Definition Classes
    StatusCodes
    Note

    You should use the internalServerError constructor provided by the Responses trait to ensure that errors produced by endpoints are consistently handled by interpreters.

  6. abstract def NoContent: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  7. abstract def NotFound: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  8. abstract def NotImplemented: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  9. abstract def OK: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  10. abstract def Unauthorized: (Responses.this)#StatusCode

    Permalink
    Definition Classes
    StatusCodes
  11. abstract def choiceResponse[A, B](responseA: (Responses.this)#Response[A], responseB: (Responses.this)#Response[B]): (Responses.this)#Response[Either[A, B]]

    Permalink

    Alternative between two possible choices of responses.

    Alternative between two possible choices of responses.

    Server interpreters construct either one or the other response. Client interpreters accept either one or the other response. Documentation interpreters list all the possible responses.

  12. abstract def emptyResponse: (Responses.this)#ResponseEntity[Unit]

    Permalink

    Empty response entity

  13. abstract def response[A](statusCode: (Responses.this)#StatusCode, entity: (Responses.this)#ResponseEntity[A], docs: Documentation = None): (Responses.this)#Response[A]

    Permalink

    statusCode

    Response status code

    entity

    Response entity

    docs

    Response documentation Server interpreters construct a response with the given status and entity. Client interpreters accept a response only if it has a corresponding status code.

  14. implicit abstract def responseInvFunctor: InvariantFunctor[(Responses.this)#Response]

    Permalink
  15. abstract def textResponse: (Responses.this)#ResponseEntity[String]

    Permalink

    Text response entity

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. final def badRequest(docs: Documentation = None): (Responses.this)#Response[(Responses.this)#ClientErrors]

    Permalink

    Bad Request (400) response, with an entity of type ClientErrors.

    Bad Request (400) response, with an entity of type ClientErrors.

    See also

    endpoints.algebra.Errors and endpoints.algebra.BuiltInErrors

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def internalServerError(docs: Documentation = None): (Responses.this)#Response[(Responses.this)#ServerError]

    Permalink

    Internal Server Error (500) response, with an entity of type ServerError.

    Internal Server Error (500) response, with an entity of type ServerError.

    See also

    endpoints.algebra.Errors and endpoints.algebra.BuiltInErrors

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def ok[A](entity: (Responses.this)#ResponseEntity[A], docs: Documentation = None): (Responses.this)#Response[A]

    Permalink

    OK (200) Response with the given entity

  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wheneverFound[A](responseA: (Responses.this)#Response[A], notFoundDocs: Documentation = None): (Responses.this)#Response[Option[A]]

    Permalink

    Turns a Response[A] into a Response[Option[A]].

    Turns a Response[A] into a Response[Option[A]].

    Interpreters represent None with an empty HTTP response whose status code is 404 (Not Found).

Inherited from StatusCodes

Inherited from AnyRef

Inherited from Any

Ungrouped