[BUG] Buffering and WebAPI (resurrecting)
Describe the bug
I've been encountering compatibility issues between .NET WebAPI and Refit's streaming (i.e. non-buffered) protocol.
After a lot of testing, I found that setting Buffered = true fixes these issues. I found this old issue which seems to report the same problems when streaming is used.
The previous issue was closed after buffering was switched to opt-in. However, it was subsequently changed back to opt-out.
What should be the default value for RefitSettings.Buffered? Even if the answer is true, what's the root cause for WebAPI's failing to deserialize large (>1500 bytes) streaming requests?
Does the streaming implementation follow the spec regarding transfer-encoding:chunked?
Got this same issue. I was sending a POST request with a large JSON body and it was sent empty unless I read the body content before sending. It took much time and tests to find out this was the real problem. The issue was fixed thanks to this workaround: Set Refit.Settings.Buffered = true