- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am doing the ajax logging request written below. From the emulator, it is ok, the request work very well. But from the device connected (wifi+USB) i get the error 401.
Do you have a track to solve this problem?
server ip address : 192.168.0.10
django server :http://192.168.0.10:8000/
iphone ip/wifi address : 192.168.0.15
Here is the code
LOGIN_URL = http://192.168.0.10:8000/api/v1/
alert("Sending ajax login request"+LOGIN_URL);
$.ajax({
url: LOGIN_URL,
username: username,
password: password,
success: function(data) {
alert("SignIn :Success sending ajax login request");
$.ui.loadContent("nextpage", null, null, "fade");
},
error: function(xhr) {
if(xhr.status == 401) {
alert("xhr.status= " + xhr.status);
$.ui.popup("Authentication failed. Check your username and password.");
}
}
});
Very Best Regards
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend that you include a * (asterisk) in the Domain List field on the Project panel for your application. The asterisk allows for communication to any web server or site via your application or AJAX call. You can find the Domain List field with in the Cordova Hybrid Mobile App settings > Build Settings > (desired platform such as Android, iOS etc...)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page