FakeHttpServer

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open val actualHost: String
Link copied to clipboard
open val actualPort: Int
Link copied to clipboard
Link copied to clipboard
var errorHandler: suspend (Throwable) -> Unit?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun allHandler(handler: suspend (HttpServer.BaseRequest) -> Unit): HttpServer
Link copied to clipboard
suspend override fun close()
Link copied to clipboard
suspend fun errorHandler(handler: suspend (Throwable) -> Unit): HttpServer
Link copied to clipboard
suspend fun httpHandler(handler: suspend (HttpServer.Request) -> Unit): HttpServer
Link copied to clipboard
suspend fun listen(port: Int = 0, host: String = "127.0.0.1"): HttpServer
suspend fun listen(port: Int = 0, host: String = "127.0.0.1", handler: suspend (HttpServer.Request) -> Unit): HttpServer
Link copied to clipboard
inline suspend fun HttpServer.router(block: HttpServerRouter.() -> Unit)
Link copied to clipboard
suspend fun websocketHandler(handler: suspend (HttpServer.WsRequest) -> Unit): HttpServer