❔ HttpContext reading Request and Response body
I use serilog for my logging system. My aim is that converting Request body and response body to string and logging them as a string to my log file.
There is no problem with Request Body. But When it comes to Response Body, the method in this pictur return "" as a string. Just emtpy.
So i asked to ChatGPT. It gives me that
This code When I use this code. There is exception that says Specified method is not supported.
When I dlete that line. I got new error that says Stream does not support reading
So ChatGPT gave me totally new class and new method logic that
For this method
6 Replies
After all, I asked ChatGPT so many question, I searched on Google so much, but Cant find a single solution for my problems
so, uhh
what's not working?
I cant read response body
using what code?
you've posted like 3 different attempts
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.