Hi, I'm having a problem with HttpClient. Everything is working fine on simulator but on iphone 3GS(5.0.1) I get "request failed because redirected too many times".
On my apache access logs I see that there is only one call with 302 return code.
var http_client = Titanium.Network.createHTTPClient({autoRedirect:true}); http_client.onload = function(e) { //if (http_client.readyState==4 && http_client.status==200){ alert(this.responseText); var data = JSON.parse(this.responseText); OAuth2.code = data.code; //} }; http_client.open('POST','xxx'); http_client.setRequestHeader("Content-type","application/x-www-form-urlencoded") http_client.send('username=' +textFieldLogin.value + '&password=' + textFieldPassword.value);any solution ? looks like a bug in titanium
1 Answer
Solved, OAuth2 redirect_uri was wrong in PHP script
Your Answer
This question has been locked and cannot accept new answers.