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
sink 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
sink . |
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()
RequestBody
contentType
in class RequestBody
public long contentLength()
RequestBody
sink
in a call to RequestBody.writeTo(okio.BufferedSink)
,
or -1 if that count is unknown.contentLength
in class RequestBody
public void writeTo(okio.BufferedSink sink) throws IOException
RequestBody
sink
.writeTo
in class RequestBody
IOException
Copyright © 2019. All rights reserved.