I am newbie to angularjs2. Trying to post data on api using jsonp
. Here I am calling the api :
let url = 'http://localhost/TestApp.Web.Api/api/user';
let body = JSON.stringify(user);
let headers = new Headers({'Content-Type': 'application/json'});
let options = new RequestOptions({headers:headers});
this.jsonp.post(url,body,options)
.map(this.extractData)
.catch(this.handleError)
.subscribe();
I have tested the api through fiddler and it is working fine with the same data.But here if i submit the data it is showing
Cannot post/register
Any suggestion?