okhttp / okhttp3 / MediaType / toMediaType

toMediaType

@JvmStatic @JvmName("get") fun String.toMediaType(): MediaType

Returns a media type for this string.

Exceptions

IllegalArgumentException - if this is not a well-formed media type.