1. Go to this page and download the library: Download tobento/service-requester 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/ */
tobento / service-requester example snippets
use Tobento\Service\Requester\Requester;
use Tobento\Service\Requester\RequesterInterface;
use Nyholm\Psr7\Factory\Psr17Factory;
// Any PSR-7 server request
$serverRequest = (new Psr17Factory())->createServerRequest(
method: 'GET',
uri: 'https://example.com',
);
$requester = new Requester($serverRequest);
var_dump($requester instanceof RequesterInterface);
// bool(true)