force-rest-api icon indicating copy to clipboard operation
force-rest-api copied to clipboard

Redirect not working

Open twiechert opened this issue 6 years ago • 1 comments
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.

twiechert avatar Nov 28 '18 14:11 twiechert

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.

jesperfj avatar Jul 26 '20 22:07 jesperfj