public abstract class RequestBody extends Object
| Constructor and Description |
|---|
RequestBody() |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
abstract MediaType |
contentType() |
static RequestBody |
create(MediaType contentType,
byte[] content) |
static RequestBody |
create(MediaType contentType,
byte[] content,
int offset,
int byteCount) |
static RequestBody |
create(MediaType contentType,
ByteString content) |
static RequestBody |
create(MediaType contentType,
File file) |
static RequestBody |
create(MediaType contentType,
String content) |
abstract void |
writeTo(BufferSink sink) |
public static RequestBody create(MediaType contentType, String content)
public static RequestBody create(MediaType contentType, ByteString content)
public static RequestBody create(MediaType contentType, byte[] content)
public static RequestBody create(MediaType contentType, byte[] content, int offset, int byteCount)
public static RequestBody create(MediaType contentType, File file)
public abstract MediaType contentType()
public long contentLength()
throws IOException
IOExceptionpublic abstract void writeTo(BufferSink sink) throws IOException
IOExceptionCopyright © 2019. All rights reserved.