onRequest

abstract fun onRequest(    requestType: ServerRequestType,     vararg requestTypes: ServerRequestType,     block: suspend (requestContext: RequestContext) -> Unit)(source)

Whenever a request is made for the specified type(s), the contents of the onRequest{} block will be executed.