receive

inline suspend fun <T : Any> ApplicationCall.receive(): T

Receives content for this request.

Return

instance of T received from this call.

Throws

when content cannot be transformed to the requested type.


suspend fun <T : Any> ApplicationCall.receive(type: KClass<T>): T
suspend fun <T : Any> ApplicationCall.receive(type: KType): T

Receives content for this request.

Return

instance of T received from this call.

Parameters

type

instance of KClass specifying type to be received.

Throws

when content cannot be transformed to the requested type.