PHP code example of innmind / rest-client
1. Go to this page and download the library: Download innmind/rest-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/ */
innmind / rest-client example snippets
use Innmind\OperatingSystem\Factory;
use Innmind\Url\Path;
use Innmind\UrlResolver\UrlResolver;
use function Innmind\Rest\Client\bootstrap;
$os = Factory::build();
$client = bootstrap(
$os->remote()->http(),
new UrlResolver,
$os->filesystem()->mount(Path::of('/somewhere/to/cache/data')),
);
$client
->server('http://example.com/')
->capabilities()
->names();