OWIN OnSendingHeaders Callback - Reading Response Body

二次信任 提交于 2019-12-02 08:44:32

What do you want to do with the response body?

This callback is invoked on first write, so it's too late to replace the stream. You also can't read from the response stream as there is nothing stored in it normally. This is normally a write-only stream that goes out to the network.

Replacing the response stream earlier is the correct approach here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!