bind

inline fun <RET> bind(noinline function: suspend T.() -> RET, method: HttpMethod, route: String?)(source)
inline fun <PAR, RET> bind(noinline function: suspend T.(PAR) -> RET, method: HttpMethod, route: String?)(source)
inline fun <PAR1, PAR2, RET> bind(noinline function: suspend T.(PAR1, PAR2) -> RET, method: HttpMethod, route: String?)(source)
inline fun <PAR1, PAR2, PAR3, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3) -> RET, method: HttpMethod, route: String?)(source)
inline fun <PAR1, PAR2, PAR3, PAR4, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4) -> RET, method: HttpMethod, route: String?)(source)
inline fun <PAR1, PAR2, PAR3, PAR4, PAR5, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5) -> RET, method: HttpMethod, route: String?)(source)
inline fun <PAR1, PAR2, PAR3, PAR4, PAR5, PAR6, RET> bind(noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6) -> RET, method: HttpMethod, route: String?)(source)

Binds a given route with a function of the receiver.

Parameters

function

a function of the receiver

method

a HTTP method

route

a route


inline fun <PAR1 : Any, PAR2 : Any> bind(noinline function: suspend T.(ReceiveChannel<PAR1>, SendChannel<PAR2>) -> Unit, route: String?)(source)

Binds a given web socket connection with a function of the receiver.

Parameters

PAR1

the type of each message received via websocket

PAR2

the type of each message to be sent via websocket

function

a function of the receiver

route

a route


inline fun <PAR : Any> bind(noinline function: suspend T.(SendChannel<PAR>) -> Unit, route: String?)(source)

Binds a given server-sent events connection with a function of the receiver.

Parameters

PAR

the type of each message received via sse

function

a function of the receiver

route

a route