-
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
string
method*
Case-sensitive method. -
return
static
Example:
$request = $request->withMethod('POST');
echo $request->getMethod();
// Outputs: POST
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.