Set this property to true
if this request should automatically follow redirects. The default is true
.
Automatic redirect will only happen for "GET" and "HEAD" requests and only for the status codes HttpStatus.movedPermanently
(301), HttpStatus.found
(302), HttpStatus.movedTemporarily
(302, alias for HttpStatus.found
), HttpStatus.seeOther
(303) and HttpStatus.temporaryRedirect
(307). For HttpStatus.seeOther
(303) automatic redirect will also happen for "POST" requests with the method changed to "GET" when following the redirect.
All headers added to the request will be added to the redirection request(s). However, any body send with the request will not be part of the redirection request(s).
bool followRedirects
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-io/HttpClientRequest/followRedirects.html