-
Notifications
You must be signed in to change notification settings - Fork 2
Message: withProtocolVersion Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\Message
Return an instance with the specified HTTP protocol version.
-
param
string
version*
HTTP protocol version. -
return
static
Example:
echo $message->getProtocolVersion();
// Outputs: 1.1
$message = $message->withProtocolVersion('2.0');
echo $message->getProtocolVersion();
// Outputs: 2.0
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.