# Decorator RawBodyParams

Decorator operation input
Module
import { RawBodyParams } from "@tsed/common"
Source/packages/common/src/mvc/decorators/params/rawBodyParams.ts

# Overview

function RawBodyParams(): ParameterDecorator;

# Description

RawBodyParams return the value from request.body (opens new window) as a Buffer.

# Example

@Controller('/')
class MyCtrl {
   @Post('/')
   create(@RawBodyParams() body: Buffer) {
      console.log('Entire body', body.toString('utf8'));
   }
}
1
2
3
4
5
6
7

Other topics