Answer the question
In order to leave comments, you need to log in
Ionic 2 how to do cross domain request?
I am writing in ionic 2. I will send a request like this:
let headers = new Headers({
'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'
});
let options = new RequestOptions({
headers: headers,
withCredentials: true,
});
this.items = 'l='+credentials.lgn+'&p='+credentials.pwd;
this.http.post(this.apiUrl+credentials.sch + '/login', this.items, options)
.map(res => res.json())
.subscribe(data => {
console.log(data);
Answer the question
In order to leave comments, you need to log in
As the question is formulated, so I will formulate the answer.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question