$ resp ->is_redirect ()
resp
Returns true when the response code is 300 through 399.
Copyright © 2001 O'Reilly & Associates. All rights reserved.