1. Go to this page and download the library: Download api-clients/transport 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/ */
api-clients / transport example snippets
$locator = new MiddlewareLocator(); // A concrete class implementing the middleware locator interface
$loop = EventLoopFactory::create(); // The event loop
$options = []; // Client options, as described below
$client = Factory::create($locator, $loop, $options);
$request = new PsrRequest(); //
$requestOptions = []; // Options such as middleware settings
$client->request($request, $requestOptions)->done(function (ResponseInterface $response) {
// Handle the response
});