PHP code example of http-interop / response-sender
1. Go to this page and download the library: Download http-interop/response-sender library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
http-interop / response-sender example snippets
composer
use function Http\Response\send;
// Any ResponseInterface instance can be used.
$notFound = $responseFactory->createResponse(404);
// Send headers and body.
send($notFound);