code: static PollStrategy tryToCreate(RestProxy restProxy, SwaggerMethodParser methodParser, HttpRequest originalHttpRequest, HttpResponse httpResponse, long delayInMilliseconds) {
          final String locationUrl = getHeader(httpResponse);
  
          URL pollUrl = null;
          if (locationUrl != null && !locationUrl.isEmpty()) {
              if (locationUrl.startsWith("/")) {
                  try {
                      final URL originalRequestUrl = originalHttpRequest.url();
                      pollUrl = new URL(originalRequestUrl, locationUrl);
                  } catch (MalformedURLException ignored) {
                  }
              } else {
                  final String locationUrlLower = locationUrl.toLowerCase(Locale.ROOT);
                  if (locationUrlLower.startsWith("http://") || locationUrlLower.startsWith("https://")) {
                      try {
                          pollUrl = new URL(locationUrl);
                      } catch (MalformedURLException ignored) {
                      }
                  }
              }
          }
  
          return pollUrl == null
                  ? null
                  : new LocationPollStrategy(
                          new LocationPollStrategyData(restProxy, methodParser, pollUrl, delayInMilliseconds));
      }
docs: Try to create a new LocationOperationPollStrategy object that will poll the provided location
  URL. If the provided HttpResponse doesn't have a Location header or the header is empty,
  then null will be returned.
  @param originalHttpRequest The original HTTP request.
  @param methodParser The method parser that describes the service interface method that
  initiated the long running operation.
  @param httpResponse The HTTP response that the required header values for this pollStrategy
  will be read from.
  @param delayInMilliseconds The delay (in milliseconds) that the resulting pollStrategy will
  use when polling.