---
lang: en
title: 'API docs: rest.restapplication.bodyparser'
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.restapplication.bodyparser.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [RestApplication](./rest.restapplication.md) &gt; [bodyParser](./rest.restapplication.bodyparser.md)

## RestApplication.bodyParser() method

Bind a body parser to the server context

<b>Signature:</b>

```typescript
bodyParser(bodyParserClass: Constructor<BodyParser>, address?: BindingAddress<BodyParser>): Binding<BodyParser>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  bodyParserClass | <code>Constructor&lt;BodyParser&gt;</code> |  |
|  address | <code>BindingAddress&lt;BodyParser&gt;</code> | Optional binding address |

<b>Returns:</b>

`Binding<BodyParser>`


