| Package | Description |
|---|---|
| okhttp3 |
An HTTP+HTTP/2 client for Android and Java applications.
|
| okhttp3.guide | |
| okhttp3.internal.http | |
| okhttp3.recipes |
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
MultipartBody.ALTERNATIVE
The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the
semantics are different.
|
static MediaType |
MultipartBody.DIGEST
This type is syntactically identical to "multipart/mixed", but the semantics are different.
|
static MediaType |
MultipartBody.FORM
The media-type multipart/form-data follows the rules of all multipart MIME data streams as
outlined in RFC 2046.
|
static MediaType |
MultipartBody.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 |
MultipartBody.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() |
MediaType |
FormBody.contentType() |
MediaType |
MultipartBody.contentType()
A combination of
MultipartBody.type() and MultipartBody.boundary(). |
static MediaType |
MediaType.parse(String string)
Returns a media type for
string, or null if string is not a well-formed media
type. |
MediaType |
MultipartBody.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. |
MultipartBody.Builder |
MultipartBody.Builder.setType(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 |
PostStreaming.MEDIA_TYPE_MARKDOWN |
static MediaType |
PostFile.MEDIA_TYPE_MARKDOWN |
static MediaType |
PostString.MEDIA_TYPE_MARKDOWN |
static MediaType |
PostStreamingWithPipe.MEDIA_TYPE_MARKDOWN |
Copyright © 2017. All Rights Reserved.