CORS (Status Code: 203)


#1

Hi,

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.


#2

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


#3

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.


#4

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?


#5

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


#6

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


#7

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


#8

Look at this:


#9

… 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.


#10

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.


#11

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.