If post call works then the get calls giving empty result


#1

Im stuck with a strange issue,I have one login screen and a venue listing screen.If the login works then venues api gives empty array as response.If i call venue before login ,getting the venue array as response,The given issue is only in the apk build,In browser both of the apis works correctly.

login.ts

var data = JSON.stringify({
“name”: this.loginForm.value.email, // Change username
“pass”: this.loginForm.value.password // Change password
});

this.ApiServiceProvider.postWithoutToken(‘login?
_format=json’,data).subscribe(res=>{
console.log(res)
},
err=>{
console.log(err)
})

venue.ts
let header=new Headers({‘Content-Type’: ‘application/json’});
this.ApiServiceProvider.getWithoutToken(‘venues’, {headers:
header}).subscribe(res=>{
console.log(res);
},
err=>{
console.log(error)
}

apiservice.ts
getWithoutToken(url, options?) {
return this.http.get(environment.apiUrl + ‘/’ + url+’?_format=json’);
}
postWithoutToken(url, data) {
return this.http.post(environment.apiPostUrl+url, data);
}

Any Idea?


#2

missing the +’/’+ between posturl and url , if the model is the same as get