constructor(platform: Platform, public http: Http) {
this.platform = platform;
this.headers = new Headers();
this.headers.append('Content-Type', 'application/x-www-form-urlencoded');
}
send(subject, body)
{
var body = "subject=" + subject + "&body=" + body;
let result = this.http.post('http://172.16.2.115:3004/message',
body,
{
headers: this.headers
});
console.log(body);
console.log(this._apiUrl);
return result;
}
I am trying to post a message to a Ruby on Rails web service using Ionic2 and Angular2 beta. The web service works just fine, the issue is that the ionic app doest seem to be posting the message. Does this look right?