<T, R extends ApiResponse<T>> PendingResult<T> get(
      ApiConfig config, Class<? extends R> clazz, Map<String, String> headers, String... params) {
    // FIXME: Refactor this to reuse implementation in overloaded get()
    if (params.length % 2 != 0) {
      throw new IllegalArgumentException("Params must be matching key/value pairs.");
    }

    StringBuilder query = new StringBuilder();

    boolean channelSet = false;
    for (int i = 0; i < params.length; i += 2) {
      if (params[i].equals("channel")) {
        channelSet = true;
      }
      query.append('&').append(params[i]).append('=');

      // URL-encode the parameter.
      try {
        query.append(URLEncoder.encode(params[i + 1], "UTF-8"));
      } catch (UnsupportedEncodingException e) {
        // This should never happen. UTF-8 support is required for every Java implementation.
        throw new IllegalStateException(e);
      }
    }

    // Channel can be supplied per-request or per-context. We prioritize it from the request,
    // so if it's not provided there, provide it here
    if (!channelSet && channel != null && !channel.isEmpty()) {
      query.append("&channel=").append(channel);
    }

    final Map<String, String> allHeaders = addDefaultHeaders(headers);

    return getWithPath(
        clazz,
        config.fieldNamingPolicy,
        config.hostName,
        config.path,
        config.supportsClientId,
        query.toString(),
        requestMetricsReporter.newRequest(config.path),
        allHeaders);
  }
Shut down this GeoApiContext instance, reclaiming resources. After shutdown() has been called,
no further queries may be done against this instance.
src/main/java/com/google/maps/GeoApiContext.java