code: private String checkRedirectResponse(final URL url, final String method, final Integer timeout, final Properties props, final String postData,
              final String redirect, final boolean ignoreBody, final List<Metric> metrics) throws Exception {
          // @todo handle sticky/port and follow param options
  
          String response = null;
          HttpURLConnection conn = (HttpURLConnection) url.openConnection();
          conn.setRequestMethod(method);
          HttpUtils.setRequestProperties(props, conn, timeout);
          String initialUrl = String.valueOf(conn.getURL());
          String redirectedUrl = null;
          if ("POST".equals(method)) {
              HttpUtils.sendPostData(conn, postData);
          }
          response = HttpUtils.parseHttpResponse(conn, false, ignoreBody);
          redirectedUrl = String.valueOf(conn.getURL());
  
          if (!redirectedUrl.equals(initialUrl)) {
              Metric metric = new Metric("onredirect", "", new BigDecimal(1), null, null);
              metrics.add(metric);
          }
          return response;
      }
docs: Apply the logic to check for url redirects.
  
  @param url
  - The server URL
  @param method
  - The HTTP method
  @param timeout
  - The timeout
  @param props
  -
  @param postData
  -
  @param redirect
  -
  @param ignoreBody
  -
  @param metrics
  - This list will be filled with the gathered metrics
  @return String
  @throws Exception
  -