Plugin native http not work

Hi everyone, I’ve got a problem with my application developed with ionic 3.
The application was finished, but after a few months the person I developed the app for wanted to make some changes and now the app doesn’t work only in part.
Particularly when I send an image with POST request to the server I always get back an error. I didn’t have this problem before. Here the code:

this.http.post('https://www.domainame.com', {richiesta: 'registraUtenteCliente', parameters: param}, {}) //param contains all information for registration
       .then(data => {
        this.nativeStorage.setItem("infoItem", {name: this.nome, surname: this.cognome, phone: this.telefono})
        .then(

          () => console.log("Salvato nuovo cliente"),
          error => console.log('Errore ' + error));

          this.navCtrl.push(HomePage);
       },
       error => alert("errore"));
       var image = this.base64Image.replace("data:image/jpeg;base64,","");
       this.http.post('https://www.albergoromagna.cloud', {richiesta: 'registraFotoCliente', numero: this.telefono,
       immagine : image},{}).then( 
         data => console.log(),
         error => alert("errore"));
       const loader = this.loadingCtrl.create({
        content: "Caricamento...",
        duration: 4000
      });
      loader.present();

In the first request I send to the server all the parameters for the registration and that’s all ok, after I send the photo catch with native camera plugin, and I get back the error. It seems that the server is not responding, but if I send the photo with postman the server responds correctly. I tried to remove android platform and plugin directory, and when i build for android sometimes it works. When it works if I rebuild again, the image post request will fail again.
I don’t want to delete plugins and remove android platform every time because sometimes it works and sometimes it doesn’t. I think it is a problem with node. Does anyone know how to fix this problem?

Why aren’t you using ordinary Angular HttpClient?

I’m using native http because i always use it in my application, and i think is better in ionic. You suggest me to use angular HTTPClient?
Thank you for help me!

Absolutely. It automatically handles management of Content-Type for you, along with properly serializing payloads. It allows centralizing things like authentication into interceptors. Requests are parameterized, which gives you easy type safety for return values.

In short, it makes your code easier to read, write, and maintain, allowing you to concentrate on the parts of your app that are truly important.

Thank you so much, I thought that native plugin was better. But in these days I find that the error are the dimension of the image and the length of the string that I obtain converting the image in base64. Now I reduce the quality of the image and it works. Next days I’ll change the method for making request to server and I’m going to use HTTPClient of Angular. Thanks for your help.