1. Go to this page and download the library: Download innmind/http-transport 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 / http-transport example snippets
use Innmind\HttpTransport\Curl;
use Innmind\TimeContinuum\Earth\Clock;
use Innmind\Http\Request;
$fulfill = Curl::of(new Clock);
$either = $fulfill(
Request::of(/* initialize your request */),
);
use Innmind\HttpTransport\Logger
use Psr\Log\LoggerInterface;
$fulfill = Logger::psr(/* an instance of Transport */, /* an instance of LoggerInterface */)
$fulfill(/* your request */);
use Innmind\HttpTransport\ExponentialBackoff;
use Innmind\TimeWarp\Halt\Usleep;
$fulfill = ExponentialBackoff::of(
/* an instance of Transport */,
new Usleep,
);
$fulfill(/* your request */);
use Innmind\HttpTransport\CircuitBreaker;
use Innmind\TimeContinuum\Earth\{
Clock,
Period\Minute,
};
$fulfill = CircuitBreaker::of(
/* an instance of CircuitBreaker */,
new Clock,
new Minute(10),
);
$fulfill(/* your request */);
use Innmind\HttpTransport\FollowRedirections;
$fulfill = FollowRedirections::of(/* an instance of Transport */);
$fulfill(/* your request */);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.