public class MediaTypeUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.mule.runtime.api.metadata.MediaType |
APPLICATION_YAML |
static org.mule.runtime.api.metadata.MediaType |
YAML |
| Constructor and Description |
|---|
MediaTypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.mule.runtime.api.metadata.MediaType |
resolveDefaultResponseMediaType(Charset defaultCharset,
org.mule.runtime.api.metadata.MediaType defaultResponseMediaType)
Resolves the default
MediaType to be used when processing the response. |
static org.mule.runtime.api.metadata.MediaType |
resolveDefaultResponseMediaType(RestConfiguration config,
org.mule.runtime.api.metadata.MediaType defaultMediaType)
Resolves the default
MediaType to be used when processing the response. |
public static final org.mule.runtime.api.metadata.MediaType APPLICATION_YAML
public static final org.mule.runtime.api.metadata.MediaType YAML
public static org.mule.runtime.api.metadata.MediaType resolveDefaultResponseMediaType(Charset defaultCharset, org.mule.runtime.api.metadata.MediaType defaultResponseMediaType)
MediaType to be used when processing the response.defaultCharset - from Mule Runtime to be used on those media types that doesn't provide a default charset.defaultResponseMediaType - the default response MediaType in case if server response doesn't send this
information in the header Content-Type, which may or may not have a charset parameter.MediaType with the charset resolved, by a default value by mime type or by the provided as parameter.public static org.mule.runtime.api.metadata.MediaType resolveDefaultResponseMediaType(RestConfiguration config, org.mule.runtime.api.metadata.MediaType defaultMediaType)
MediaType to be used when processing the response.config - RestConfiguration to get the defaultCharset from Mule Runtime.MediaType.Copyright © 2023. All rights reserved.