Closed myangelkamikaze closed 4 years ago
Yes, it is because of 304.... it has no body.
If it's not too much work, would it be possible to add a better exception for cases like this? Though this issue might be enough already. Thanks for the clarification!
I close this issue.. feel free to reopen if needed.
Response body is not read yet. Use SessionEventArgs.GetResponseBody() or SessionEventArgs.GetResponseBodyAsString() method to read the response body. at Titanium.Web.Proxy.Http.Response.EnsureBodyAvailable(Boolean throwWhenNotReadYet) at Titanium.Web.Proxy.EventArguments.SessionEventArgs.GetResponseBody(CancellationToken cancellationToken)
(I have no idea how to post a stack trace)
I've been getting this exception when trying to read the response body in the BeforeResponse handler. The exception makes no real sense because I'm always using GetResponseBody. What I did notice after a while is that this only happens on response status 304.
Is it possible that GetResponseBody is failing because of 304?