public function emitBody(ResponseInterface $response)
    {
        $output = $this->createOutputStream();
        
        if (!$output) {
            throw new \RuntimeException("Failed to open output stream");
        }
        
        $response->getBody()->rewind();
        $handle = $response->getBody()->detach();
        
        stream_copy_to_stream($handle, $output);
    }
public function emitBody(ResponseInterface $response)
    {
        $output = $this->createOutputStream();
        
        if (!$output) {
            throw new \RuntimeException("Failed to open output stream");
        }
        
        $response->getBody()->rewind();
        $handle = $response->getBody()->detach();
        
        stream_copy_to_stream($handle, $output);
    }
public function emitBody ( ResponseInterface $ response ) { $ output = $ this -> createOutputStream ( ) ; if ( ! $ output ) { throw new \ RuntimeException ( "Failed to open output stream" ) ; } $ response -> getBody ( ) -> rewind ( ) ; $ handle = $ response -> getBody ( ) -> detach ( ) ; stream_copy_to_stream ( $ handle , $ output ) ; }
Emit the HTTP body

@param ResponseInterface $response
@throws \RuntimeException
Emit the HTTP body