@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 733 B
Markdown
lang: en
title: 'API docs: rest.bodyparser.supports'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest.bodyparser.supports.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [BodyParser](./rest.bodyparser.md) > [supports](./rest.bodyparser.supports.md)
## BodyParser.supports() method
Indicate if the given media type is supported
<b>Signature:</b>
```typescript
supports(mediaType: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| mediaType | <code>string</code> | Media type |
<b>Returns:</b>
`boolean`