Http4sServerOptions

Companion
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

object Log

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def customInterceptors[F[_], G[_]](exceptionHandler: Option[ExceptionHandler], serverLog: Option[ServerLog[G[Unit]]], metricsInterceptor: Option[MetricsRequestInterceptor[G, Http4sResponseBody[F]]], additionalInterceptors: List[Interceptor[G, Http4sResponseBody[F]]], unsupportedMediaTypeInterceptor: Option[UnsupportedMediaTypeInterceptor[G, Http4sResponseBody[F]]], decodeFailureHandler: DecodeFailureHandler)(implicit evidence$1: Sync[G]): Http4sServerOptions[F, G]

Creates default Http4sServerOptions with custom interceptors, sitting between two interceptor groups:

Creates default Http4sServerOptions with custom interceptors, sitting between two interceptor groups:

  1. the optional exception interceptor and the optional logging interceptor (which should typically be first when processing the request, and last when processing the response)),
  2. the optional unsupported media type interceptor and the decode failure handling interceptor (which should typically be last when processing the request).

The options can be then further customised using copy constructors or the methods to append/prepend interceptors.

Value Params
additionalInterceptors

Additional interceptors, e.g. handling decode failures, or providing alternate responses.

decodeFailureHandler

The decode failure handler, from which an interceptor will be created.

exceptionHandler

Whether to respond to exceptions, or propagate them to http4s.

serverLog

The server log using which an interceptor will be created, if any. To keep the default, use Http4sServerOptions.Log.defaultServerLog

unsupportedMediaTypeInterceptor

Whether to return 415 (unsupported media type) if there's no body in the endpoint's outputs, which can satisfy the constraints from the Accept header

def default[F[_], G[_]](implicit evidence$2: Sync[G]): Http4sServerOptions[F, G]
def defaultCreateFile[F[_]](implicit sync: Sync[F]): ServerRequest => F[File]
def defaultDeleteFile[F[_]](implicit sync: Sync[F]): TapirFile => F[Unit]