title: Bad Request for http.put() with request body
body: <p>I am using HttpClient from '@angular/common/http' and wanted to perform put operation.</p>
  
  <p>My Angular code is like :</p>
  
  <pre><code>public updateDetails(data: Data) {
  
  
      const url = '/project/rest/v1/configuration/device/update'
      console.log(JSON.stringify(data));
      let headers = new HttpHeaders();
       headers.append('Content-Type' , 'application/json');
  
  
      let body = JSON.stringify(data);
  
      return this.http.put(url, data, { headers: headers })
        .map(response =&gt; true)
        .catch(err =&gt; {
          console.log(err);
          return Observable.of(false);
        });
  
    }
  </code></pre>
  
  <p>But, i am getting </p>
  
  <blockquote>
    <p>HttpErrorResponse {headers: HttpHeaders, status: 400, statusText: "Bad
    Request",</p>
  </blockquote>
  
  <p>Please help me what i am missing. I tried to pass the data in stringfy format but that is also giving me same error.</p>