HttpServer

constructor(adapter: HttpServerPort, settings: HttpServerSettings = HttpServerSettings(), block: HandlerBuilder.() -> Unit)

Create a server with a builder (HandlerBuilder) to set up handlers.

Return

A new server with the configured handlers.

Parameters

adapter

The server engine.

settings

Server settings. Port and address will be searched in this map.

block

Handlers' setup block.


constructor(adapter: HttpServerPort, handler: HttpHandler, settings: HttpServerSettings = HttpServerSettings())