public final class FormBody extends RequestBody
| Modifier and Type | Class and Description |
|---|---|
static class |
FormBody
|
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength()
Returns the number of bytes that will be written to
out in a call to
RequestBody, 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
Writes the content of this request to
out.
|
public int size()
public StringencodedName(int index)
public Stringname(int index)
public StringencodedValue(int index)
public Stringvalue(int index)
public MediaTypecontentType()
RequestBody
public long contentLength()
RequestBody
out in a call to
RequestBody.writeTo(okio.BufferedSink) , or -1 if that count is unknown.
public void writeTo(okio.BufferedSink sink) throws IOException
RequestBody
out.
writeTo in class
RequestBody
IOException