title: How to retrieve the current response body length?
body: <p>I need  to retrieve the response body length. </p>
  
  <p>When I look at <a href="https://github.com/aspnet/HttpAbstractions/wiki/Rolling-Notes-Response-Stream-Contract" rel="noreferrer">https://github.com/aspnet/HttpAbstractions/wiki/Rolling-Notes-Response-Stream-Contract</a> it is said that:</p>
  
  <blockquote>
    <p>Stream.Position {get} and Stream.Length {get} return cumulative bytes written</p>
  </blockquote>
  
  <p>This is exactly what I need, but <code>httpContext.Response.Body.Length</code> raises the <code>NotSupportedException</code> and says "The stream is not seekable."</p>
  
  <p>Should I use a delegating stream for counting bytes on each write?</p>