receiveOrNull

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

Receives content for this request.

Return

instance of T received from this call, or null if content cannot be transformed to the requested type.


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

Receives content for this request.

Return

instance of T received from this call, or null if content cannot be transformed to the requested type..

Parameters

type

instance of KClass specifying type to be received.