Ionic 2 - Http POST body parameters not being sent
<p>I am using Ionic 2 Beta 11. I am trying to send a request to an external API which will return a JSON response. I have overcome CORS issues and I am communicating with the API however <strong>I can not send the body information</strong> that is required. I have tried formatting the body variable in the following ways, each with no success:</p>

<p>As an object: <code>{email: this.email, password: this.password}</code></p>

<p>As a stringified object: <code>JSON.stringify({email: this.email, password: this.password})</code></p>

<p>As a string: <code>'email=' + this.email + '&amp;password=' + this.password</code></p>

<p>Here is my code:</p>

<pre><code>import {Component}                                      from '@angular/core';
import {NavController, MenuController}                  from 'ionic-angular';
import {Http, Headers, RequestOptions}                  from '@angular/http';
import 'rxjs/Rx';

@Component({
  templateUrl: 'build/pages/login/login.html'
})
export class LoginPage {
  nav: NavController;    
  username: string;
  password: string;

  constructor(nav: NavController, private http: Http) {
    this.nav = nav;
  }

  doLogin() {
    let body = JSON.stringify({
      email: this.username,
      password: this.password });
    let headers = new Headers({
      'NDAPI-Key': 'XXXXXXXXXX',
      'NDAPI-Host': 'XXXXXXXXXXX' });
    let options = new RequestOptions({ headers: headers });

    this.http
        .post('/api', body, options)
        .map(res =&gt; res.json())
        .subscribe(
            data =&gt; {
              console.log(data);
            },
            err =&gt; {
              console.log("ERROR!: ", err);
            }
        );
  }
}
</code></pre>