This is a migrated thread and some comments may be shown as answers.

cross domain ajax call fails

1 Answer 104 Views
Android Devices
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
JonathanElsner
Top achievements
Rank 1
JonathanElsner asked on 11 Oct 2013, 07:14 PM
The below call is failing when deployed on an android device.  This works on an iOS device, in desktop browsers, just not on Android or from chrome browser running on Android. 

I can't figure out how to make this work.  Any suggestions?

$.ajax({
        type: "GET",
        url: _restBaseUrl + "/api/v1/employees",
        dataType: "json",
        headers: {
            'Authorization': "Basic xxxx"
        },
        success: function (d) {
            alert(d.length);
        },
        error: function (d) {
            alert(d.statusText + d.status + d.responseText);
        }
    });

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Oct 2013, 12:55 PM
Hi Jonathan,

Android debugging is currently not trivial, as the Android port of WebKit doesn't provide a Web Inspector interface for its WebView. What you can do is use add console.log all over the problematic code and check out your device logs in Graphite's output pane or use remote web debugger like Weinre.

You can also setup Fiddler to intercept your device's traffic and give you a clue what's going on by reviewing the requests/responses.

Regards,
Steve
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
Tags
Android Devices
Asked by
JonathanElsner
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or