class Body : Closeable
(source)
A Body to be send with the Request.
stream
- A stream that will be read and send to the resource.
Body(stream: InputStream)
|
fun close(): Unit
Closes this body and releases any system resources associated with it. |
|
fun <R> useStream(block: (InputStream) -> R): R
Executes the given block function on the body's stream and then closes it down correctly whether an exception is thrown or not. |
fun fromFile(file: File): Body
|
|
fun fromString(value: String): Body
|