1. Go to this page and download the library: Download johnathan-smith/xttp 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/ */
johnathan-smith / xttp example snippets
use JohnathanSmith\Xttp\Xttp;
/** @var \JohnathanSmith\Xttp\XttpResponseWrapper $xttpResponse */
$xttpResponse = Xttp::post('https://johnathansmith.com', ['form_params' => ['foo' => 'bar'], 'headers' => ['Content-Type' => 'application/x-www-form-urlencoded']]);
// You may also do get, put, patch, delete.