@Body(options?:IParamOptions) | save(@Body() data: CustomDto) | Inject a body an parameters options can using bodyParser middleware. using req.body |
@BodyParam(name:string, options?:IParamOptions) | save(@BodyParam('name') name:string) | Inject a body an parameters options can using bodyParser middleware. using req.body.name |
@Params() | get(@Params() params: any) | Inject all parameters req.params |
@Param(name:string, options?:IParamOptions) | get(@Param('id') id: string) | Inject a query parameter req.params.id |
@HeaderParams() | get(@HeaderParams() params: any) | Inject all parameters req.headers |
@HeaderParam(name:string, options?:IParamOptions) | get(@HeaderParam("authorization") authorization: string) | Inject a header parameter req.headers.authorization |
@CookieParams() | get(@Cookies( cookies: any) | Inject all cookies parameter req.cookies |
@CookieParam(name:string, options?:IParamOptions) | get(@Cookie("token") token: string) | Inject a cookie parameter req.cookies.token |
@UploadFiles(name:string, options?:IUploadOptions) | post(@UploadFiles("photos") photos: any[]) | Inject multiple upload files from parameter req.files using middleware express-fileupload |
@UploadFile(name:string, options?:IUploadOptions) | post(@UploadFile("photo") photo: any) | Inject single upload file from parameter req.files using middleware express-fileupload |