NestJS · Junior · Question 75 of 75
Why prefer @Body(), @Param() and @Query() over @Req() in handlers?
- 1
@Req()doesn't work in Nest - ✓Correct answer: They make inputs explicit, work with pipes for validation and transformation, and keep handlers independent of Express or Fastify
- 3They make requests faster
Explanation
With @Req() you depend on the platform's request object and lose automatic validation of each value.