Page 3 of 3

Error using REST Service Test function

Posted: Wed Dec 11, 2013 7:39 pm
by Maryna Brodina

Sure!


Error using REST Service Test function

Posted: Wed Dec 18, 2013 2:01 pm
by Maryna Brodina

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.


Error using REST Service Test function

Posted: Fri Jan 03, 2014 7:19 pm
by Embo

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!


Error using REST Service Test function

Posted: Sat Jan 04, 2014 1:43 am
by Embo

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.


Error using REST Service Test function

Posted: Mon Jan 06, 2014 6:06 pm
by Maryna Brodina

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.


Error using REST Service Test function

Posted: Mon Jan 06, 2014 6:17 pm
by Embo

I get the following:

code
{"readyState":0,"responseText":"","status":0,"statusText":"error"}
/code

Thanks


Error using REST Service Test function

Posted: Mon Jan 06, 2014 9:14 pm
by Maryna Brodina

Please try with "Release" option checked in App Settings--Android binary tab.


Error using REST Service Test function

Posted: Sat Jan 11, 2014 1:54 pm
by Embo

I'm all set. I can see the responses on the device.
Thanks!