Sure!
Hello! The problem is that service you call gives incorrect response. There is a list of MIME-types, for example text/plain or image/png, but service you call respond with text only. It's incorrect response and we can't parse it on our side. You can run curl because it doesn't check response type. If it's your service change response type to text/plain.
Good catch! I do see it now... The service returns this:
Content-Type: text;charset=UTF-8
instead of:
Content-Type: text/plain;charset=UTF-8
Unfortunately, it is not my web service. I did bring it to their attention, but it will most likely be months (or years) if it ever gets fixed. Is there any possible chance that Appery could allow this Mime Type? Browsers seem to be ok with it as well.
Looking forward to your response.
Thanks again for figuring this out!
I tried the workaround that you suggested ( "Disable same origin policy" mode)... you're right, it does work. Which makes me doubt that the root cause is the "text" Mime type.
I also tested with Android and IOS, and in both cases, it does NOT work. I get a textStatus of "Error" but no actual error message in errorThrown.
So, the only thing that works is the workaround in the browser that you've suggested;. Please let me know how I can make this work on my device.
Thanks.
Hello! Sorry for a late reply. Please add prealert(JSON.stringify(jqXHR));/pre on service Error or Complete event to see what's there in response.
I get the following:
code
{"readyState":0,"responseText":"","status":0,"statusText":"error"}
/code
Thanks
Please try with "Release" option checked in App Settings--Android binary tab.
I'm all set. I can see the responses on the device.
Thanks!