type
type: (MediaType) -> stringThe top-level type, lowercase (application).
MediaType.get(…)
MediaType.parse(…)
RequestBody.create(…):contentType()| Method | Returns | Description |
|---|---|---|
type() | string | The top-level type, lowercase (application). |
subtype() | string | The subtype, lowercase (json). |
charset() | string? | The charset parameter as a canonical charset name (UTF-8), or nil. |
equals(any) | boolean | Whether other is a media type of the same text. |
toString() | string | The text it was made from. |
get(string) | MediaType | The media type string names; a malformed one is IllegalArgumentException. |
parse(string) | MediaType? | The media type string names, or nil when it is malformed. |
| Method | Returns | Description |
|---|---|---|
MediaTypeClass.get | MediaType | The media type string names; a malformed one is IllegalArgumentException. |
MediaTypeClass.parse | MediaType? | The media type string names, or nil when it is malformed. |
RequestBody.contentType | MediaType? | The content type, or nil. |
ResponseBody.contentType | MediaType? | The Content-Type, or nil. |
typetype: (MediaType) -> stringThe top-level type, lowercase (application).
subtypesubtype: (MediaType) -> stringThe subtype, lowercase (json).
charsetcharset: (MediaType) -> string?The charset parameter as a canonical charset name (UTF-8), or nil.
equalsequals: (MediaType, any) -> booleanWhether other is a media type of the same text.
toStringtoString: (MediaType) -> stringThe text it was made from.
getget: (string) -> MediaTypeThe media type string names; a malformed one is IllegalArgumentException.
parseparse: (string) -> MediaType?The media type string names, or nil when it is malformed.