CORS (Status Code: 203)


When I call the api, I am getting this response:

Response: {“status”:false,“error”:“Unsupported content-type”}

Status Code: 203 Non-Authoritative Information

It’s the issue of ‘CORS’. It runs successfully in the apk & receiving the appropriate response, but not in the browser.

Somebody, please help me. I am stuck with this, since few days.

Your server probably may not return a status code 203 but a code 200. Fix that.

I think, my server has responded with status code - 200, but transformation has applied, because of ‘CORS’. Hence, not receiving the proper response.

This same thing works in apk, when I deploy it on android. Please, have a look at the attached screenshot.

It shows in the screenshot that it responded with 203. Is the JSON it is showing in the black bar returned from your server? What is the response body?

The response is: {“status”:false,“error”:“Unsupported content-type”}

A post was split to a new topic: How to check server request history in ionic?

Then this is something you have to fix on your server or with the request you are sending to your server.

Look at this:

… which has nothing to do with CORS as far as I can see.

Find out what your server is returning on the server side if you want to make sure.

I’ve checked the server. It’s returning 203, when I call the api through browser.

But, the same thing runs successfully in the apk, when I deploy the app on device.

You mentioned that a few times.

But it doesn’t matter - if your app doesn’t want a 203, you have to return something else than a 203 from your server. Find out why your server application returns a different response (different request?) and change that.