1. Go to this page and download the library: Download pbmengine/php-restclient 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/ */
pbmengine / php-restclient example snippets
bash
composer
php
use Pbmengine\Restclient\HttpClient;
$client = new HttpClient;
// or
$client = new HttpClient(\GuzzleHttp\Client, 'https://example.com/v1', ['timeout' => 30]);
$response = $client->get('users');
$response = $client->jsonPayload(['id' : 1])->post('users');