protected function headersAndBody(MessageInterface $message)
    {
        $string = '';

        foreach ($message->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                $string .= $name.': '.$value."\n";
            }
        }

        $string .= "\n";
        $string .= (string) $message->getBody();

        return $string;
    }
protected function headersAndBody(MessageInterface $message)
    {
        $string = '';

        foreach ($message->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                $string .= $name.': '.$value."\n";
            }
        }

        $string .= "\n";
        $string .= (string) $message->getBody();

        return $string;
    }
protected function headersAndBody ( MessageInterface $ message ) { $ string = '' ; foreach ( $ message -> getHeaders ( ) as $ name => $ values ) { foreach ( $ values as $ value ) { $ string .= $ name . ': ' . $ value . "\n" ; } } $ string .= "\n" ; $ string .= ( string ) $ message -> getBody ( ) ; return $ string ; }
Generate the headers and body part of the message.

@param MessageInterface $message

@return string
Generate the headers and body part of the message .