code: public static boolean isRedirect(int statusCode) {
      switch (statusCode) {
        case HttpStatusCodes.STATUS_CODE_MOVED_PERMANENTLY: // 301
        case HttpStatusCodes.STATUS_CODE_FOUND: // 302
        case HttpStatusCodes.STATUS_CODE_SEE_OTHER: // 303
        case HttpStatusCodes.STATUS_CODE_TEMPORARY_REDIRECT: // 307
          return true;
        default:
          return false;
      }
    }
docs: Returns whether the given HTTP response status code is a redirect code {@code 301, 302, 303,
  307}.
  
  @since 1.11