method
follow_redirect!
v8.0.0 -
Show latest stable
- Class:
ActionDispatch::Integration::RequestHelpers
follow_redirect!(headers: {}, **args)public
Follow a single redirect response. If the last response was not a redirect, an exception will be raised. Otherwise, the redirect is performed on the location header. If the redirection is a 307 or 308 redirect, the same HTTP verb will be used when redirecting, otherwise a GET request will be performed. Any arguments are passed to the underlying request.
The HTTP_REFERER header will be set to the previous url.