title: How to get body value (Stream) from request without clean it?
body: <p>I'm trying to get body from request of an authorization class (AuthorizationHandler), but that body is a Stream and after reading your content, the post request that comes on next can not be executed because Stream content has been disposable.</p>
  
  <p>I'm using this code to get Stream content:</p>
  
  <pre><code>protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, Autorizacao requirement)
  {
      var routeValues = context.Resource as AuthorizationFilterContext;
      if (routeValues != null)
      {
          var obj = StreamToObject(routeValues.HttpContext.Request.Body);
          context.Succeed(requirement);
      }
      return Task.FromResult(0);
  }
  
  private Object StreamToObject(Stream stream)
  {
      try
      {
          string content;
          using (var reader = new StreamReader(stream))
          content = reader.ReadToEnd();
          return Newtonsoft.Json.JsonConvert.DeserializeObject(content);
      }
      catch (Exception e)
      {
          throw e;
      }
  }
  </code></pre>
  
  <p>How i can do to workaround this problem ?</p>