How to turn server response into page contents?

See also Cheatsheet connect getcockpit with vanilla PHP