-
Notifications
You must be signed in to change notification settings - Fork 1
Message: getBody Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\Message
Gets the body of the message.
-
return
StreamInterface
Example:
$stream = $message->getBody();
// Assume the content is a HTML formatted string.
// getContent() is a method defined in StreamInterface.
echo $stream->getContents();
// Outputs: <html>...</html>
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.