1. Go to this page and download the library: Download chaoswd/http 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/ */
chaoswd / http example snippets
haos\Http\Http;
$http = new Http();
// Basic GET request
$response = $http->get('https://jsonplaceholder.typicode.com/todos/1');
// $response is now a response object - use `json()`, `object()`, or `array()` for which response type you want.
var_dump($response->json());