I am currently facing an issue with a rest call in my Ionic app. The call works fine on Android devices but encounters problems on iOS devices. Below is the implementation of the rest call in my Ionic service.
import { Http } from '@angular/http';
import { Injectable } from '@angular/core';
@Injectable()
export class loginService {
constructor(private http : Http){ }
getAllUsers(authData){
console.log(authData);
return this.http.post('http://Some IP add:8080/api/customerr/getUser', authData);
}
}
This is how I handle the received data in my login.ts file
this.loginservice.getAllUsers(this.loginForm.value).subscribe((response) => {
this.loginResponse = response.json()
} (err)=>{
alert(err)
});