automorph.transport.http.server.AkkaServer
See theAkkaServer companion object
final case class AkkaServer[Effect[_]](effectSystem: EffectSystem[Effect], port: Int, pathPrefix: String, methods: Iterable[HttpMethod], mapException: Throwable => Int, readTimeout: FiniteDuration, serverSettings: ServerSettings, config: Config, guardianProps: Props, handler: RequestHandler[Effect, Context]) extends ServerTransport[Effect, Context]
Akka HTTP server 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
- config
-
actor system configuration
- effectSystem
-
effect system plugin
- guardianProps
-
guardian actor properties
- handler
-
RPC request handler
- mapException
-
maps an exception to a corresponding HTTP status code
- methods
-
allowed HTTP request methods
- pathPrefix
-
HTTP URL path prefix, only requests starting with this path prefix are allowed
- port
-
port to listen on for HTTP connections
- readTimeout
-
request read timeout
- serverSettings
-
HTTP server settings
Attributes
Members list
In this article