Question · NestJS course · Module 2: Routing and Request Lifecycle
@Body Decorator
What is the @Body() decorator used for in NestJS?
Answer options
- Retrieves parameters from the URL
- Retrieves request headers
- Retrieves data from the HTTP request body
- Retrieves the query string
Show the answer
Correct answer:
- Retrieves data from the HTTP request body