title: Ionic 4 Angular 7 - HTTPClient.post() is not returning any response
body: <p>I am trying to do a HTTPClient.post() to a web service but I am receiving no response. </p>
  
  <p>I tried executing the service call through post man and I am receiving a response.</p>
  
  <p>I have tried enabling and disabling CORS but there is no difference.</p>
  
  <p>Below is my service.ts</p>
  
  <p><strong><em>authentication.service.ts</em></strong></p>
  
  <pre><code>    import { Platform } from '@ionic/angular';
      import { Injectable } from '@angular/core';
      import { Storage } from '@ionic/storage';
      import { BehaviorSubject } from 'rxjs';
      import { HttpClient, HttpHeaders, HttpRequest, HttpParams, HttpResponse } from '@angular/common/http';
  
      const TOKEN_KEY = 'auth-token';
  
      @Injectable({
        providedIn: 'root'
      })
      export class AuthenticationService {
  
        constructor(private storage: Storage, private plt: Platform,private http: HttpClient) { }
  
         login() {
          const url ="http://localhost/login";
          const  params = JSON.stringify(new  HttpParams().set('Login', "testuser").set('Password', "test").set('Mobile', "true"));
          const httpOptions = {
            headers: new HttpHeaders({
              'Accept': 'application/json',
              'Content-Type':  'application/x-www-form-urlencoded'
            })
          };
  
         this.http.post(url,params,httpOptions).subscribe((response) =&gt; {
            console.log(response);
          }, error =&gt; {
            console.log(error);
         });
        }
      }
  </code></pre>
  
  <p>I have tried adding header options as below but none have helped.</p>
  
  <pre><code>    'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Methods': 'GET, POST, OPTIONS, PUT, PATCH, DELETE',
      'Access-Control-Allow-Headers': 'X-Requested-With,content-type',
      'Access-Control-Allow-Credentials': true 
  </code></pre>
  
  <p>I have tried by adding responseType: 'json' but that doesn't compile.</p>
  
  <p>What am I doing wrong?</p>