title: Sending Request from Angular to Java Servlet
body: <p>I have an angular app and a java servlet backend. what I need to do is send httpRequest from angular to backend. I am using httpClient to do that.<br>
  MyService.ts</p>
  
  <pre><code>import { Injectable, EventEmitter } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  @Injectable()
  export class MyServices {
  
    constructor(private httpClient: HttpClient) {}
    public getTables(num: number) {
      return this.httpClient.post("url/to/backend",JSON.stringify({number: num}));
    }
  }
  </code></pre>
  
  <p>and in my servlet I receive the request but when I use requset.getParameter to get the number value it returns null. I'm sure when I read the request body it returns:</p>
  
  <blockquote>
    <p>"{"number":3}"</p>
  </blockquote>
  
  <p>when I use request.getParametersName it returns null again. does anyone know what I am doing wrong? and am I using the right tool for sending an httpRequest?</p>