# Decorator RawBodyParams
Decorator operation inputModule | 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
2
3
4
5
6
7
Other topics
- Session & cookies
- Passport.js
- Keycloak
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- AWS
- Seq
- OIDC
- Stripe
- Controllers
- Providers
- Model
- JsonMapper
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Exceptions
- Throw HTTP Exceptions
- Cache
- Hooks
- Response Filter
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing
- Customize 404