okhttp / okhttp3 / RequestBody
abstract class RequestBody
||Returns the number of bytes that will be written to sink in a call to writeTo, or -1 if that count is unknown.
open fun contentLength():
||Returns the Content-Type header for this body.
abstract fun contentType():
||A duplex request body is special in how it is transmitted on the network and in the API contract between OkHttp and the application.
open fun isDuplex():
||Returns true if this body expects at most one call to writeTo and can be transmitted at most once. This is typically used when writing the request body is destructive and it is not possible to recreate the request body after it has been sent.
open fun isOneShot():
||Writes the content of this request to sink.
abstract fun writeTo(sink:
Companion Object Functions