Sometimes there is a need to overwrite the response body with a middleware or to change output based on some condition in your code logic. This allows better control over your responses.
This will only work in the new v3 output buffering as the v2 output buffering does not write everything to the response.
Sometimes there is a need to overwrite the response body with a middleware or to change output based on some condition in your code logic. This allows better control over your responses.
This will only work in the new v3 output buffering as the v2 output buffering does not write everything to the response.