public <T> StatsRequestResult<T> send(StatsResponseProcessor<? extends T> processor) throws IOException, StatsResponseException {
    HttpClient client = newClient();
    HttpRequest request = newRequest();

    HttpResponse<String> response = trySend(client, request);
    int code = response.statusCode();
    if (code == SUCCESS_CODE) {
      T result = processor.onSucceed(new StatsHttpResponse(response, code));
      return StatsRequestResult.succeed(result);
    }
    else {
      if (onFail != null) {
        onFail.handle(new StatsHttpResponse(response, code), code);
      }
      return StatsRequestResult.error(code);
    }
  }
public <T> StatsRequestResult<T> send(StatsResponseProcessor<? extends T> processor)