HttpClient Module, Calls with http.post are made repeatedly and do not stop

Hello everyone, I am newest using ionic and angular.

Right now i am practice with ionic v3 and angular v4, and i am having some problems with the proyect, I created a new provider for comunicate with my server on AWS (Only for educational purpose), the EndPoint its works, i use Postman for verify this and works (using POST calls and sending the message using JSON format), also the problem is that the POST calls are made repeatedly and saturate the application, i tried some ways to do the POST calls but this do the same thing. Maybe i am doing some wrong. The code for provider is:

import { HttpClient, HttpHeaders } from ‘@angular/common/http’;
import { Injectable } from ‘@angular/core’;
import { GlobalProvider } from ‘…/global/global’;
import { Observable } from ‘rxjs/Observable’;
import ‘rxjs/Rx’;

/*
Generated class for the RestdbProvider provider.

See https://angular.io/guide/dependency-injection for more info on providers
and Angular DI.
*/
export enum TActionCrud {
tacInsert,
tacUpdate,
tacDelete,
tacSearch,
tacList
}

@Injectable()
export abstract class RestdbProvider {
private http: HttpClient;
private response: any;
private action: TActionCrud;
protected JSONdata: any;
protected Class: string;

constructor(ahttp: HttpClient) {
this.http = ahttp;
this.Class = “”;
}

protected abstract getPOSTDataInsert();

protected abstract getPOSTDataUpdate();

protected abstract getPOSTDataDelete();

protected abstract getPOSTDataSearch();

protected abstract getPOSTDataList();

protected doMove() {
this.JSONdata = this.getResponse();
}

protected abstract getObjectList();

private fillPOSTData(JSONDataElement: string) {

return {
  "class": this.Class,
  "action": this.getActionCrudString(),
  "data": JSONDataElement
}

}

private getActionCrudString(): string {

switch (this.action) {
  case TActionCrud.tacInsert:
    return "";
  case TActionCrud.tacUpdate:
    return "";
  case TActionCrud.tacDelete:
    return "";
  case TActionCrud.tacSearch:
    return "";
  case TActionCrud.tacList:
    return "GetList";
}
return "";

}

private getPOSTData() {

switch (this.action)
{
  case TActionCrud.tacInsert:
    return this.fillPOSTData(this.getPOSTDataInsert());
  case TActionCrud.tacUpdate:
    return this.fillPOSTData(this.getPOSTDataUpdate());
  case TActionCrud.tacDelete:
    return this.fillPOSTData(this.getPOSTDataDelete());
  case TActionCrud.tacSearch:
    return this.fillPOSTData(this.getPOSTDataSearch());
  case TActionCrud.tacList:
    return this.fillPOSTData(this.getPOSTDataList());
}
return {};

}

private getPOSTHeaders() {
let headers = new HttpHeaders();

headers.append("Access-Control-Allow-Headers","*");
headers.append("Content-Type","application/json");
return { "headers": headers };

}

private doHTTPPOST(url: string, body: any, options: any) {

return new Promise(
  function(resolve,reject) {
    this.http.post(url,body,options)
    .map(result => result.json())
    .subscribe((result: Response) => { resolve(result) })
    .catch(error => reject(new Error(error)));
  }
);

}

private doPOST() {

console.log("Enter");
this.doHTTPPOST(GlobalProvider.RESTDBURL,JSON.stringify(this.getPOSTData()),this.getPOSTHeaders())
.then(function(value) { this.response = value.toString(); })
.catch(function(reason) { this.response = null; console.log(reason)})
/*
this.http.post(GlobalProvider.RESTDBURL,JSON.stringify(this.getPOSTData()),this.getPOSTHeaders())
.map((result: Response) => result.json)
.subscribe(data => { console.log(data) });
//.subscribe((result: Response) => {this.response = result.json; console.log(result); });
//.map((result: Response) => {this.response = result.json; console.log(result); });
//.catch((error) => Observable.throw( console.log(error)));*/

}

public doInsert() {

this.action = TActionCrud.tacInsert;
this.doPOST();

}

public doUpdate() {

this.action = TActionCrud.tacUpdate;
this.doPOST();

}

public doDelete() {

this.action = TActionCrud.tacDelete;
this.doPOST();

}

public doSearch() {

this.action = TActionCrud.tacSearch;
this.doPOST();
this.doMove();

}

public getList() {

this.action = TActionCrud.tacList;
this.doPOST();
console.log(this.response);
return this.getObjectList();

}

protected getResponse() {

return this.response;

}
}

The POST call works, and return the response fine, the problem is that it made repeadly and not stop causing that the browser colapse. the method doPOST() it use the module HttpClient and the message “Enter” is showed in the console infinitely

I hope that you can help me with this. Thanks in advance

This is literally impossible unless you did something wrong. Uninstall and then reinstall by following official Ionic documentation.