receive

inline suspend fun <T> HttpStatement.receive(): T

Deprecated (with error)

Use `body` method instead

Replace with

this.body<T>()

Executes this statement and run HttpClient.responsePipeline with the response and expected type T.

Note if T is a streaming type, you should manage how to close it manually.


inline suspend fun <T, R> HttpStatement.receive(crossinline block: suspend (response: T) -> R): R

Deprecated (with error)

Use `body` method instead

Replace with

this.body<T>()

Executes this statement and run the block with a HttpClient.responsePipeline execution result.

Note that T can be a streamed type such as ByteReadChannel.