---
schema_version: "1"
id: 80a1f926ac2a3352766d82597fcfafae0747a874999b667941fcafc5eb02c8e4
title: isHandledBy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-mime-functions-ishandledby.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-mime-functions-ishandledby
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 6e9b1dc22182b973aeeaf6e01137c83f4ec20e2a3e5eb75e8b91eedc9c08b338
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# isHandledBy

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## isHandledBy(base: MimeType, other: MimeType): Boolean

Returns `true` if the given `MimeType` value is handled by the base `MimeType` value.

_Introduced in DataWeave version 2.7.0._

### Parameters

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><p><code>base</code></p></td><td><p><code>MimeType</code></p></td><td><p>The MIME type value used as baseline.</p></td></tr><tr><td><p><code>other</code></p></td><td><p><code>MimeType</code></p></td><td><p>The MIME type value to be validated.</p></td></tr></tbody></table>

### Example

This example tests how MIME types handles several validations.

#### Source

```DataWeave
%dw 2.0
import * from dw::module::Mime
output application/json

var JSON = {'type': "application", subtype: "json", parameters: {}}
var MULTIPART = {'type': "multipart", subtype: "form-data", parameters: {boundary: "my-boundary"}}
var ALL = {'type': "*", subtype: "*", parameters: {}}
---
{
  a: isHandledBy(JSON, JSON),
  b: isHandledBy({'type': "*", subtype: "json", parameters: {}}, JSON),
  c: isHandledBy({'type': "application", subtype: "*", parameters: {}}, JSON),
  d: isHandledBy(ALL, MULTIPART),
  e: isHandledBy(MULTIPART, ALL),
  f: isHandledBy(JSON, MULTIPART),
  g: isHandledBy(
    {'type': "application", subtype: "*+xml", parameters: {}},
    {'type': "application", subtype: "soap+xml", parameters: {}})
}
```

#### Output

```Json
{
  "a": true,
  "b": true,
  "c": true,
  "d": true,
  "e": false,
  "f": false,
  "g": true
}
```
