Modifier and Type | Field and Description |
---|---|
static MediaType |
MultipartBuilder.ALTERNATIVE
The "multipart/alternative" type is syntactically identical to
"multipart/mixed", but the semantics are different.
|
static MediaType |
MultipartBuilder.DIGEST
This type is syntactically identical to "multipart/mixed", but the
semantics are different.
|
static MediaType |
MultipartBuilder.FORM
The media-type multipart/form-data follows the rules of all multipart
MIME data streams as outlined in RFC 2046.
|
static MediaType |
MultipartBuilder.MIXED
The "mixed" subtype of "multipart" is intended for use when the body
parts are independent and need to be bundled in a particular order.
|
static MediaType |
MultipartBuilder.PARALLEL
This type is syntactically identical to "multipart/mixed", but the
semantics are different.
|
Modifier and Type | Method and Description |
---|---|
abstract MediaType |
ResponseBody.contentType() |
abstract MediaType |
RequestBody.contentType()
Returns the Content-Type header for this body.
|
static MediaType |
MediaType.parse(String string)
Returns a media type for
string , or null if string is not a
well-formed media type. |
Modifier and Type | Method and Description |
---|---|
static ResponseBody |
ResponseBody.create(MediaType contentType,
byte[] content)
Returns a new response body that transmits
content . |
static RequestBody |
RequestBody.create(MediaType contentType,
byte[] content)
Returns a new request body that transmits
content . |
static RequestBody |
RequestBody.create(MediaType contentType,
byte[] content,
int offset,
int byteCount)
Returns a new request body that transmits
content . |
static RequestBody |
RequestBody.create(MediaType contentType,
okio.ByteString content)
Returns a new request body that transmits
content . |
static RequestBody |
RequestBody.create(MediaType contentType,
File file)
Returns a new request body that transmits the content of
file . |
static ResponseBody |
ResponseBody.create(MediaType contentType,
long contentLength,
okio.BufferedSource content)
Returns a new response body that transmits
content . |
static ResponseBody |
ResponseBody.create(MediaType contentType,
String content)
Returns a new response body that transmits
content . |
static RequestBody |
RequestBody.create(MediaType contentType,
String content)
Returns a new request body that transmits
content . |
MultipartBuilder |
MultipartBuilder.type(MediaType type)
Set the MIME type.
|
Copyright © 2016. All Rights Reserved.