ktor-client-core / io.ktor.client.call / receive

receive

inline suspend fun <reified T> HttpClientCall.receive(): T
Deprecated: Use `body` method instead


inline suspend fun <reified T> HttpResponse.receive(): T
Deprecated: Use `body` method instead

Tries to receive the payload of the response as an specific type T.

Exceptions

NoTransformationFoundException - If no transformation is found for the type T.

DoubleReceiveException - If already called receive.

suspend fun receive(info: TypeInfo): Any
Deprecated: Use `body` method instead

Tries to receive the payload of the response as a specific expected type provided in info. Returns response if info corresponds to HttpResponse.

Exceptions

NoTransformationFoundException - If no transformation is found for the type info.

DoubleReceiveException - If already called receive.