title: Angular 6 post data to rest API but returns error 500
body: <p>I require to post the data to the rest API but it returns error 500. When I test the API in Postman the API is working. </p>
  
  <p><a href="https://i.stack.imgur.com/nmweS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nmweS.png" alt="Postman response"></a></p>
  
  <p><b>authentication.service.ts</b></p>
  
  <pre><code>register(email: string, fullName: string,contactNo: string) {
      var data = {
          'email' : email,
          'fullName' : fullName,
          'contactNo': contactNo
      };
  
      return this.http.post&lt;any&gt;(`http://localhost:80/user`, {data})
          .pipe(map(user =&gt; {
  
              JSON.stringify(user);
              return user;
          }));
  }
  </code></pre>