TapirHttpEndpoint

automorph.transport.http.endpoint.TapirHttpEndpoint
See theTapirHttpEndpoint companion object
final case class TapirHttpEndpoint[Effect[_]](effectSystem: EffectSystem[Effect], pathPrefix: String, method: Option[HttpMethod], mapException: Throwable => Int, handler: RequestHandler[Effect, Context]) extends EndpointTransport[Effect, Context, Full[Unit, Unit, Request, Unit, (Array[Byte], StatusCode), Any, Effect]]

Tapir HTTP endpoint message transport plugin.

Interprets HTTP request body as an RPC request and processes it using the specified RPC request handler.

  • The response returned by the RPC request handler is used as HTTP response body.

Type parameters

Effect

effect type

Value parameters

effectSystem

effect system plugin

handler

RPC request handler

mapException

maps an exception to a corresponding HTTP status code

method

allowed HTTP method, all methods are allowed if empty

pathPrefix

HTTP URL path prefix, only requests starting with this path prefix are allowed

Attributes

Constructor

Creates a Tapir HTTP endpoint message transport plugin with specified effect system and request handler.

See also
Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait EndpointTransport[Effect, Context, Full[Unit, Unit, Request, Unit, (Array[Byte], StatusCode), Any, Effect]]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def adapter: Full[Unit, Unit, Request, Unit, (Array[Byte], StatusCode), Any, Effect]

Transport layer adapter.

Transport layer adapter.

Attributes

Definition Classes
override def withHandler(handler: RequestHandler[Effect, Context]): TapirHttpEndpoint[Effect]

Create a copy of this endpoint transport with specified RPC request handler.

Create a copy of this endpoint transport with specified RPC request handler.

Value parameters

handler

RPC request handler

Attributes

Returns

server transport

Definition Classes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
Logging (hidden)