PHP code example of webclient / ext-protocol-version

1. Go to this page and download the library: Download webclient/ext-protocol-version 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/ */

    

webclient / ext-protocol-version example snippets




use Webclient\Extension\ProtocolVersion\ProtocolClientDecorator;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;

/** 
 * @var ClientInterface $client Your PSR-18 HTTP Client
 */
$http = new ProtocolClientDecorator($client);

/** @var RequestInterface $request */
$response = $http->sendRequest($request);