title: get the size of the response content
body: <p>I'm using an interceptor that will intercept before and after the request. The purpose of this is to get the size of the content sent and returned, however, I do not know of a way to get the answer, it seems that the <strong>response</strong> does not have a method to get it.</p>
  
  <pre><code>@Component
  public class DataUsageInterceptor extends HandlerInterceptorAdapter {
  
      private static final Logger LOG = LoggerFactory.getLogger(CheckController.class);
  
      @Override
      public boolean preHandle(
              HttpServletRequest request,
              HttpServletResponse response,
              Object handler
      ) throws Exception {
  
          System.out.println("---- " + request.getContentLength() + "----------");
  
          return super.preHandle(request, response, handler);
      }
  
      @Override
      public void afterCompletion(
              HttpServletRequest request,
              HttpServletResponse response,
              Object handler, Exception ex
      ) throws Exception {
  
          System.out.println("---------- get length here ----------------");
  
      }
  }
  </code></pre>