1. Go to this page and download the library: Download echoproxy/sdk-laravel 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/ */
use Echoproxy\Sdk\ProxyClient;
$client = app(ProxyClient::class); // bound by EchoproxyServiceProvider
$res = $client->get('https://api.openai.com/v1/models');
$res = $client->post('https://api.stripe.com/v1/charges', ['amount' => 1000]);
use GuzzleHttp\Client as Guzzle;
use GuzzleHttp\HandlerStack;
use Echoproxy\Sdk\Client;
use Echoproxy\Sdk\Http\GuzzleMiddleware;
$stack = HandlerStack::create();
$stack->push(GuzzleMiddleware::create(app(Client::class)));
$guzzle = new Guzzle(['handler' => $stack]);