I’ve a problem with
HttpRequest in Android.
I’m connecting to a mysql database through http, in my App.
I’m using POST and GET methods for login, get info, etc.
In iOS everything works fine.
However, in Android, with the same code that works in iOS, it doesn’t work.
When I try to get info this is the response result:
ResponseCode: 401 ResponseHeader: HTTP/1.1 401 Unauthorized \n Cache-Control: no-store ResponseData:
Is a rare behavior because the code and the server is the same, and i repeat, in iOS works ok.
Maybe should I use a different header for send request? this is my header:
vector<string> header; header.emplace_back("User-Agent: MyApp/1.0"); header.emplace_back("Content-Type: application/x-www-form-urlencoded"); httpRequest->setHeaders(header);
Also I read info about CookieStore in Android. But i’m not sure what’s the problem.
//cc android expert… @mars3142