receive

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

Receives content for this request. Receive operations for the same call must be sequential and must not be started from an ApplicationReceivePipeline interceptor.

Report a problem

Return

instance of T received from this call.

Throws

when content cannot be transformed to the requested type.

when another receive operation is in progress for this call.


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

Receives content for this request. Receive operations for the same call must be sequential and must not be started from an ApplicationReceivePipeline interceptor.

Report a problem

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.

when another receive operation is in progress for this call.