How to send form data in a http post request of angular 2?
<p>I am trying to send form data of the updated user details to the back end which node server in angular 2,However I couldn't send the form data and the server responds with status of 500,In angularjs  I have done something like this,
<strong>service file</strong></p>

<pre><code>  update: {
    method: 'POST',
    params: {
      dest1: 'update'
    },
    transformRequest: angular.identity,
    'headers': {
      'Content-Type': undefined
    }
  }
</code></pre>

<p><strong>In controller as</strong></p>

<pre><code>var fd = new FormData();
var user = {
  _id: StorageFactory.getUserDetail()._id,
  loc: locDetails
};
fd.append('user', angular.toJson(user));
UserService.update(fd).
$promise.then(
  function(value) {
    console.info(value);
    updateUserDetailsInStorage();
  },
  function(err) {
    console.error(err);
  }
);
</code></pre>

<p>I couldn't to figure how to do this in angular 2 as angular.toJson,angular.identity and transformrequest features are not available in angular 2,
so far I have done the following in angular 2,</p>

<pre><code> let fd = new FormData();
 let user = {
   _id: this.appManager.getUserDetail()._id,
   loc: locDetails
 };
 fd.append('user', JSON.stringify(user));
 this.userService.update(fd).subscribe((value) =&gt; {
   console.log(value);
   this.updateUserDetailsInStorage();
 }, (err) =&gt; {
   console.error(err);
 });
</code></pre>

<p><strong>http service file</strong></p>

<pre><code>update(body) {
  console.log('update', body);
  const headers = new Headers({
    'Content-Type': undefined
  });

  const options = new RequestOptions({
    headers: headers
  });
  return this.http.post(`${app.DOMAIN}` + 'user/update', body, options)
    .map((res: Response) =&gt; {
      res.json();
    }).do(data =&gt; {
      console.log('response', data);
    })
}
</code></pre>

<p>I have read many posts and tried few things but so far it was unsuccessful, could anyone suggest me how to do this?</p>