hypertrace/javaagent

Response body is not captured in apache async client if the body is not read in callback

Opened this issue · 0 comments

    Future<HttpResponse> responseFuture = client.execute(request, null);
    HttpResponse response = responseFuture.get();
    if (response.getEntity() == null || response.getEntity().getContentLength() <= 0) {
      return Pair.of(response.getStatusLine().getStatusCode(), null);
    }
    String responseBody = readInputStream(response.getEntity().getContent());