class Body : Closeable, AutoCloseable
(source)
A Body returned along with the Request.
The response body can be consumed only once..
Body(stream: InputStream)
|
open fun close(): Unit
Closes this Body and releases any system resources associated with it. |
|
fun string(charset: Charset = Charsets.UTF_8): String
Reads this body completely as a String. |
|
fun <R> useBufferedReader(charset: Charset = Charsets.UTF_8, block: (BufferedReader) -> R): R
Creates a buffered reader from this body. |
|
fun <R> useStream(block: (InputStream) -> R): R
Creates a usable stream from this body. |
fun empty(): Body
Creates an empty response body. |