code: protected HttpURLConnection openConnection(Request request) throws IOException {
          HttpURLConnection result;
          if (request.proxy != null) {
              result = (HttpURLConnection) request.url.openConnection(request.proxy);
          } else {
              result = (HttpURLConnection) request.url.openConnection();
          }
          result.setConnectTimeout(request.connectTimeout);
          result.setReadTimeout(request.readTimeout);
          return result;
      }
docs: Opens a connection based on the URL in the given request.
  
  Subclasses can override this method to use a different implementation of
  {@link HttpURLConnection}.
  
  @param request The {@link Request}.
  @return A new {@link HttpURLConnection}.
  @throws IOException If there is an error opening the connection.