src/MessageHelper.php
protected function write(Response $response, $body): Response
    {
        $response->getBody()->write((string) $body);
        return $response;
    }
protected function write(Response $response, $body): Response
    {
        $response->getBody()->write((string) $body);
        return $response;
    }
Cleanly writes the body to the response.

@param \Psr\Http\Message\ResponseInterface $response  The HTTP response
@param mixed $body  The body to write
@return \Psr\Http\Message\ResponseInterface  The same or new response