title: ionic version problem and Unexpected end of json input ionic
body: <p>As i was using ionic3. Ionic auto v4 updated and now i get this error " Unexpected end of JSON input" </p>
  
  <p>i using mysql beckend</p>
  
  <p>i changed ionic version 4 to 3.4 , but still i get same error. how can fix it </p>
  
  <p>I unable to solve it ,anyone know please teach me i will appreciate~</p>
  
  <p>login.ts</p>
  
  <pre><code>login(){
     if(this.userData.username &amp;&amp; this.userData.password){
      this.authService.postData(this.userData, "login").then((result) =&gt;{
      this.resposeData = result;
  </code></pre>
  
  <p>auth.service.ts</p>
  
  <pre><code> postData(credentials, type){
  
      return new Promise((resolve, reject) =&gt;{
        let headers = new Headers();
        this.http.post(apiUrl+type, JSON.stringify(credentials), {headers: headers}).
        subscribe(res =&gt;{
          resolve(res.json());
        }, (err) =&gt;{
          reject(err);
        });
  
      });
  
    }
  </code></pre>