@Override
  public <T, R extends ApiResponse<T>> PendingResult<T> handle(
      String hostName,
      String url,
      Map<String, String> headers,
      Class<R> clazz,
      FieldNamingPolicy fieldNamingPolicy,
      long errorTimeout,
      Integer maxRetries,
      ExceptionsAllowedToRetry exceptionsAllowedToRetry,
      RequestMetrics metrics) {
    Request.Builder builder = new Request.Builder().get();
    for (Entry<String, String> entry : headers.entrySet()) {
      builder = builder.header(entry.getKey(), entry.getValue());
    }
    Request req = builder.url(hostName + url).build();

    return new OkHttpPendingResult<>(
        req,
        client,
        clazz,
        fieldNamingPolicy,
        errorTimeout,
        maxRetries,
        exceptionsAllowedToRetry,
        metrics);
  }
A strategy for handling URL requests using OkHttp.

@see com.google.maps.GeoApiContext.RequestHandler
src/main/java/com/google/maps/OkHttpRequestHandler.java