PHP code example of maximantonisin / spirit-client
1. Go to this page and download the library: Download maximantonisin/spirit-client 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/ */
maximantonisin / spirit-client example snippets
use \Symfony\Component\HttpFoundation\Request;
$client = new MaximAntonisin\Spirit\SpiritClient([
'base_uri' => 'json.maximus.pw',
]);
$client->sendRequest('', Request::METHOD_GET, [
/** Request options. */
]);
/** @var array $response */
/** Response will contain json_decode-ed as array. */
$response = $client->getContent();