# RawQueryParams Decorator operation input
Module | import { RawQueryParams } from "@tsed/common" |
---|---|
Source | /packages/common/src/mvc/decorators/params/queryParams.ts |
# Overview
function RawQueryParams(expression: string): ParameterDecorator;
Param | Type | Description |
---|---|---|
expression | string | The path of the property to get. |
# Description
RawQueryParams return the value from request.query object.
Any validation and transformation are performed on the value. Use pipes to validate and/or transform the value.
# Example
@Controller('/')
class MyCtrl {
@Get('/')
get(@RawPathParams() params: any) {
console.log('Entire params', params);
}
@Get('/')
get(@RawPathParams('id') id: string) {
console.log('ID', id);
}
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
For more information on deserialization see converters page.
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing