-
Notifications
You must be signed in to change notification settings - Fork 1
PSR 17: ResponseFactory Example
Terry L edited this page Jun 21, 2020
·
4 revisions
Namespace
Shieldon\Psr17\ResponseFactory
None
-
param
int
code= 200
The HTTP status code. -
param
string
reasonPhrase= ''
The reason phrase to associate with the status code. -
return
ResponseInterface
Example:
use Shieldon\Psr17\ResponseFactory;
$responseFactory = new ResponseFactory();
$response = $responseFactory->createResponse(200, 'OK');
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.