@loopback/docs
Version:
Documentation for LoopBack 4
36 lines (23 loc) • 1.04 kB
Markdown
---
lang: en
title: 'API docs: rest.createbodyparserbinding'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.createbodyparserbinding.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [createBodyParserBinding](./rest.createbodyparserbinding.md)
## createBodyParserBinding() function
Create a binding for the given body parser class
<b>Signature:</b>
```typescript
export declare function createBodyParserBinding(parserClass: Constructor<BodyParser>, key?: BindingAddress<BodyParser>): Binding<BodyParser>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| parserClass | <code>Constructor<BodyParser></code> | Body parser class |
| key | <code>BindingAddress<BodyParser></code> | Optional binding address |
<b>Returns:</b>
`Binding<BodyParser>`