Hi, I try to call REST service,
First step, I try with http.get(myapiUrl), I got XMLHttpRequest,error
So, I change my get url and I added api proxy:
ionic.config.json
{
"name": "GestInt",
"app_id": "fr.gestInt",
"v2": true,
"typescript": true,
"proxies": [
{
"path": "/apilogin",
"proxyUrl": "http://apiUrl"
}]
}
clientapi.ts
this.url="/apilogin";
this.options = new RequestOptions({headers: this.headers, search: params});
return this._http.get(this.url,this.options).share()...
Sadly, the url don’t change on execution on browser > Request URL:http://localhost:8100/apilogin
PS I have serve the project