-
Notifications
You must be signed in to change notification settings - Fork 1
Request: withMethod Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\Request
Extends Message.
Return an instance with the provided HTTP method.
-
param
stringmethod*Case-sensitive method. -
return
static
Example:
$request = $request->withMethod('POST');
echo $request->getMethod();
// Outputs: POSTcomposer require shieldon/psr-httpShieldon PSR HTTP implementation written by Terry L. from Taiwan.
