Replies: 1 comment
-
Only one middleware can write to the response. You have a couple of options:
What middleware is in the pipeline? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two endpoints and the result needs to be formatted differently for each endpoint
I'm manipulating the response body in OnResultExecuting in an Action Filter.
My API has a couple of middlewares that are also changing response status codes. Since my Action filter is already doing response.body.writeAsync. The middlewares are throwing error that the response has already started. Is there a work around to safely manipulate the response without affecting any other middlewares. The code snippet is given below.
Beta Was this translation helpful? Give feedback.
All reactions