automorph.transport.http.server.UndertowServer
See theUndertowServer companion object
final case class UndertowServer[Effect[_]](effectSystem: EffectSystem[Effect], port: Int, pathPrefix: String, methods: Iterable[HttpMethod], webSocket: Boolean, mapException: Throwable => Int, builder: Builder, handler: RequestHandler[Effect, Context]) extends ServerTransport[Effect, Context]
Undertow HTTP & WebSocket server 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.
- Processes only HTTP requests starting with specified URL path.
Type parameters
- Effect
-
effect type
Value parameters
- builder
-
Undertow builder
- effectSystem
-
effect system plugin
- handler
-
RPC request andler
- 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
- webSocket
-
support upgrading of HTTP connections to use WebSocket protocol if true, support HTTP only if false
Attributes
Members list
In this article