force-rest-api
force-rest-api copied to clipboard
Redirect not working
trafficstars
In the http client, follow redirects is turned on:
conn.setInstanceFollowRedirects(true);
This, however has no effect, since later in the file, every response code not in code < 300 && code >= 200) ; (302 = redirect) causes an error.
I think the assumption was that by the time the response code is checked, HttpUrlConnection has already followed redirects. Is that not the case? I have not tested it explicitly.