Project: titanium
Issue TIMOB-15871: HTTPClient: setting autoRedirect off for 302s on Android calls onerror
If you set httpclient.autoRedirect to false and then send a GET which returns a 302 (or anything but a 200 I'm guessing), then onerror is called instead of onload. 1. 301, 302, etc. responses shouldn't be deemed an error, but if you're really set on that: 2. Make it consistent. On iOS, onload is called and on Android, onerror is called. Even if you don't, at least... 3. Give us all the information. Provide more than {error:'...'} to onerror. Give us the headers, the status, the responseText, responseData, etc. if they're there in the response. This really reduces confidence in what you're doing and requires so much more testing.
Story points: 3