Ionic Cordova HTTP Error: Too many follow-up requests: 21

Well, this a litle stanger, but in postman, using the same URL, headers and body (POST Request), work, but in ionic cordova HTTP and in some json client from google play, show this error:

Too many follow-up requests: 21

Please, how can I solve this ?

Thanks advanced for help

    var encoded = btoa(this.user + ":" + this.pass);
    var endUrl = this.testBaseURL + "/es-loginl01api.r";, JSON.stringify(this.param2), {
      'Content-Type': 'application/json' , Authorization: 'Basic ' + encoded
    }).then(data => {
    }).catch(err => {

I don’t know what framework you’re using. I use Angular, and if you are too, then I highly recommend using Angular’s HttpClient, because it eliminates a lot of the tedious and error-prone low-level logic you’re writing here.

In any event, your error is likely caused by a redirect loop. Look at the network tab of Chrome’s Developer Tools to see what URLs are pingponging.


Thanks for help…

Yes, i am using ionic + cordova + angular. I am using ionic native http, but if the angular not have this problem, I want to learn how user httpclient from angular in a ionic development…

Can I installl the httpclient from angular, or need some other modules? Many modules from angular are already installed in my application.

I searched in the google, and found for ionic 3, and i am using 5, can I use same instructions?

You shouldn’t need to install anything, but yes, you can follow Angular’s documentation exactly.

I appreciate the idea, but it doesn’t work with the server I’m accessing, or any other… any server that I don’t have access to for modify settings, I get this error when using httpclient from angular:

“Backend returned code 0, body was: [object ProgressEvent]”

From what I’ve read on the internet it’s a “CORS” problem, and only ionic’s native http works, and it really works, but it gives me the other error “Too many follow-up requests: 21”.

So I’m in trouble… does anyone know how to get around? (the server side will not touch anything, and it will stay as it is, I need to work from the client side)

PS: (as I already put, in postman it works without problems, only the native ionic and angular httpclient have these locks that I didn’t think how to disable).

The server side is where this really needs to get dealt with, so one idea would be to make a proxy server that has CORS set up properly to deal with Ionic, and that forwards requests onto the upstream server in a format that it is comfortable with.

OK. But why do ionic native and angular have these limitations? Why do they need to be so limited as other things via the desktop, like postman, aren’t they? What is the reason for this? Why doesn’t postman experience this “CORS” error, or doesn’t care for more than 21 requests, and these 2 languages have to have these limitations?

Ionic CORS guide