Package | Description |
---|---|
com.squareup.okhttp | |
com.squareup.okhttp.guide | |
com.squareup.okhttp.internal.http | |
com.squareup.okhttp.recipes | |
com.squareup.okhttp.ws |
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 |
RequestBody.contentType()
Returns the Content-Type header for this body.
|
abstract MediaType |
ResponseBody.contentType() |
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 RequestBody |
RequestBody.create(MediaType contentType,
byte[] content)
Returns a new request body that transmits
content . |
static ResponseBody |
ResponseBody.create(MediaType contentType,
byte[] content)
Returns a new response 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 RequestBody |
RequestBody.create(MediaType contentType,
String content)
Returns a new request body that transmits
content . |
static ResponseBody |
ResponseBody.create(MediaType contentType,
String content)
Returns a new response body that transmits
content . |
MultipartBuilder |
MultipartBuilder.type(MediaType type)
Set the MIME type.
|
Modifier and Type | Field and Description |
---|---|
static MediaType |
PostExample.JSON |
Modifier and Type | Method and Description |
---|---|
MediaType |
RealResponseBody.contentType() |
Modifier and Type | Field and Description |
---|---|
static MediaType |
RequestBodyCompression.MEDIA_TYPE_JSON |
static MediaType |
PostFile.MEDIA_TYPE_MARKDOWN |
static MediaType |
PostString.MEDIA_TYPE_MARKDOWN |
static MediaType |
PostStreaming.MEDIA_TYPE_MARKDOWN |
Modifier and Type | Field and Description |
---|---|
static MediaType |
WebSocket.BINARY
A
MediaType indicating binary frames should be used when sending the message. |
static MediaType |
WebSocket.TEXT
A
MediaType indicating UTF-8 text frames should be used when sending the message. |
Copyright © 2016. All rights reserved.