Phonegap on Android: AJAX request fails when setting Accept: 'application/xml' on request header -


i making requests assembla rest api. can read here: http://www.assembla.com/spaces/breakoutdocs/wiki/assembla_rest_api

the api requires set accept: 'application/xml' on request header receive xml data back. otherwise, html comes in response.

my service calls work in ios , in safari, not return in android.

my cordova.xml file has <access origin=".*"/> not think whitelist issue. have tried every variation think of here.

sample ajax request:

$.ajax({     url: 'https://www.assembla.com/spaces/my_spaces',     username: usermodel.get('username'),     password: usermodel.get('password'),     headers: {          accept: 'application/xml'     },     success: onsuccess,     error: onerror }); 

like said, request not hit either onsuccess or onerror in android. request works fine in ios , in safari. if take out headers property, request hit onsuccess in android return html.

have inspected request , response in firebug or httpheaders see if correct? see header set correctly on request. double check aren't getting server errors, , see if response coming xml.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -