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\Transport;
use Innmind\Time\Clock;
use Innmind\Http\Request;
$fulfill = Transport::curl(Clock::live());
$either = $fulfill(
Request::of(/* initialize your request */),
);
use Innmind\HttpTransport\Transport;
use Psr\Log\LoggerInterface;
$fulfill = Transport::logger(/* an instance of Transport */, /* an instance of LoggerInterface */)
$fulfill(/* your request */);
use Innmind\HttpTransport\Transport;
use Innmind\Time\Halt;
$fulfill = Transport::exponentialBackoff(
/* an instance of Transport */,
Halt::new(),
);
$fulfill(/* your request */);
use Innmind\HttpTransport\Transport;
use Innmind\Time\{
Clock,
Period,
};
$fulfill = Transport::circuitBreaker(
/* an instance of Transport */,
Clock::live(),
Period::minute(10),
);
$fulfill(/* your request */);
use Innmind\HttpTransport\Transport;
$fulfill = Transport::followRedirections(/* 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.