class FormBody : RequestBody
class Builder |
val size: Int
The number of key-value pairs in this form-encoded body. |
fun contentLength(): Long
Returns the number of bytes that will be written to sink in a call to writeTo, or -1 if that count is unknown. |
|
fun contentType(): MediaType
Returns the Content-Type header for this body. |
|
fun encodedName(index: Int): String |
|
fun encodedValue(index: Int): String |
|
fun name(index: Int): String |
|
fun value(index: Int): String |
|
fun writeTo(sink: BufferedSink): Unit
Writes the content of this request to sink. |
open fun isDuplex(): Boolean
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 isOneShot(): Boolean
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. |