title: Why @Body() in Post request is not working properly? [Nest.js]
body: <p>I'm starting to learn Nest.js, so I am following an Academind Tutorial (<a href="https://youtu.be/F_oOtaxb0L8?t=2249" rel="noreferrer">link</a>).</p>
  <p>My code is not working as expected when I try to get the <code>body</code> variable with the <code>@Body()</code> decorator in the <code>POST</code> request. Following this part of the code in <code>products.controller.ts</code></p>
  <pre><code>@Post()
  async addProduct(@Body() body: Product) {
    console.log(body);
    const generatedId = this.productService.insertProduct(body.title, body.description, 5.99);
    return generatedId;
  }
  </code></pre>
  <p>In the terminal the output is just an empty object: <code>{}</code></p>
  <p>I have searched for other examples to look at how to do it properly. I found <a href="https://www.digitalocean.com/community/tutorials/getting-started-with-nestjs" rel="noreferrer">a tutorial in DigitalOcean</a> where they also use <code>@Body</code> in the POST request; they leave a the end of the tutorial <a href="https://github.com/yemiwebby/bookstore-nest" rel="noreferrer">a repo with the example</a>. This example is neither working for me.</p>
  <p>I just did a small change in <code>addBook()</code> function on <code>book.service.ts</code> file for returning the new book instead of all books</p>
  <pre><code>addBook(book): Promise&lt;any&gt; {
      return new Promise(resolve =&gt; {
          this.books.push(book);
          // resolve(this.books);
          resolve(book);
      });
  }
  </code></pre>
  <p>I do the following POST request from Postman but an empty object is being the response.</p>
  <p><a href="https://i.stack.imgur.com/8LaoG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8LaoG.png" alt="POST request from Postman" /></a></p>
  <p>All other HTTP requests are working just nice, except for the POST one.</p>
  <p>Any ideas what could be wrong with the code? Thanks in advance. </p>