PHPackages                             indigerd/http-fault-tolerance - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. indigerd/http-fault-tolerance

ActiveLibrary[HTTP &amp; Networking](/categories/http)

indigerd/http-fault-tolerance
=============================

Handle http requests with custom fallback strategies

v0.0.5(3y ago)06131[2 PRs](https://github.com/Indigerd/http-fault-tolerance/pulls)MITPHPPHP &gt;=7.2.0

Since May 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Indigerd/http-fault-tolerance)[ Packagist](https://packagist.org/packages/indigerd/http-fault-tolerance)[ RSS](/packages/indigerd-http-fault-tolerance/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (2)Versions (8)Used By (0)

Fault Tolerant HTTP Requests
============================

[](#fault-tolerant-http-requests)

Usage
-----

[](#usage)

Example of simple usage (by default when http request will fail library will make 1 more attempt to make http request)

```
use Indigerd\Tolerance\Client;
use GuzzleHttp\Client as HttpClient;
use Indigerd\Tolerance\Fallback\FallbackFactory;
use Indigerd\Tolerance\ResponseFactory;

$client = new Client(new HttpClient(), new FallbackFactory(), new ResponseFactory());
$response = $client->request('GET', 'http://facebook.com');
echo($response->getBody());
```

Example of using with Complex fallback strategy. Complex fallback strategy is a collection of fallbacks that will be called untill one will succeed.

```
use Indigerd\Tolerance\Client;
use GuzzleHttp\Client as HttpClient;
use Indigerd\Tolerance\Fallback\FallbackFactory;
use Indigerd\Tolerance\ResponseFactory;

$client = new Client(new HttpClient(), new FallbackFactory(), new ResponseFactory());
$strategy = new \Indigerd\Tolerance\Fallback\Strategy\Complex(
    ['retry', new \Indigerd\Tolerance\Fallback\Strategy\Fixture('GGGGGG')],
    new FallbackFactory()
);
$response = $client->request('GET', 'http://google344534534534534534111111.com', [], $strategy);
echo($response->getBody());
```

Example of using library client instead of Guzzle by creating Guzzle decarator. As decorator extends Guzzle Http client you can just inject it in your code with dependency injection without changing your business logic.

```
use Indigerd\Tolerance\Decorator\GuzzleHttp\Client;

$client = new Client();
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~289 days

Total

5

Last Release

1435d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a703c1aca573c9decd6f315c7bf25ae11e8e63120318c97c6ce4819133080ac8?d=identicon)[Indigerd](/maintainers/Indigerd)

---

Top Contributors

[![Indigerd](https://avatars.githubusercontent.com/u/2143512?v=4)](https://github.com/Indigerd "Indigerd (9 commits)")

---

Tags

httplibraryfault tolerance

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/indigerd-http-fault-tolerance/health.svg)

```
[![Health](https://phpackages.com/badges/indigerd-http-fault-tolerance/health.svg)](https://phpackages.com/packages/indigerd-http-fault-tolerance)
```

###  Alternatives

[quickbooks/v3-php-sdk

The Official PHP SDK for QuickBooks Online Accounting API

28210.2M32](/packages/quickbooks-v3-php-sdk)[infamoustrey/smartsheet

An API for Smartsheet

1027.9k](/packages/infamoustrey-smartsheet)[clouding/presto-client-php

Presto client library for PHP.

2513.5k](/packages/clouding-presto-client-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
