EndpointInterceptor

sttp.tapir.server.interceptor.EndpointInterceptor
See theEndpointInterceptor companion object
trait EndpointInterceptor[F[_]] extends Interceptor[F]

Allows intercepting the handling of a request by an endpoint, when either the endpoint's inputs have been decoded successfully, or when decoding has failed. Ultimately, when all interceptors are run, the endpoint's server logic will be run (in case of a decode success), or None will be returned (in case of decode failure).

Instead of calling the nested behavior, alternative responses can be returned using the responder.

Attributes

Companion
object
Graph
Supertypes
trait Interceptor[F]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def apply[B](responder: Responder[F, B], endpointHandler: EndpointHandler[F, B]): EndpointHandler[F, B]

Type parameters

B

The interpreter-specific, low-level type of body.

Attributes