public final class FormBody extends RequestBody
| Modifier and Type | Class and Description |
|---|---|
static class |
FormBody.Builder |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
Returns the number of bytes that will be written to
out in a call to RequestBody.writeTo(okio.BufferedSink),
or -1 if that count is unknown. |
MediaType |
contentType()
Returns the Content-Type header for this body.
|
String |
encodedName(int index) |
String |
encodedValue(int index) |
String |
name(int index) |
int |
size()
The number of key-value pairs in this form-encoded body.
|
String |
value(int index) |
void |
writeTo(okio.BufferedSink sink)
Writes the content of this request to
out. |
public int size()
public String encodedName(int index)
public String name(int index)
public String encodedValue(int index)
public String value(int index)
public MediaType contentType()
RequestBodycontentType in class RequestBodypublic long contentLength()
RequestBodyout in a call to RequestBody.writeTo(okio.BufferedSink),
or -1 if that count is unknown.contentLength in class RequestBodypublic void writeTo(okio.BufferedSink sink)
throws IOException
RequestBodyout.writeTo in class RequestBodyIOExceptionCopyright © 2017. All Rights Reserved.