How to output custom HTTP body contents with CakePHP 3.4? Echoing causes “Unable to emit headers” error
Controllers should never echo data! Echoing data can lead to all kinds of problems, from the data not being recognized in the test environment, to headers not being able to be sent, and even data being cut off. Doing it that way was already wrong in CakePHP 2.x, even though it might have worked in … Read more