PHPackages                             shaggyrec/php-http-client - 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. shaggyrec/php-http-client

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

shaggyrec/php-http-client
=========================

Client for http requests from the php script

v1.2.0(4y ago)01.3kPHPPHP ^7.2|^8.0

Since Oct 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/shaggyrec/php-http-client)[ Packagist](https://packagist.org/packages/shaggyrec/php-http-client)[ RSS](/packages/shaggyrec-php-http-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (8)Dependencies (3)Versions (7)Used By (0)

Api client
==========

[](#api-client)

[![Build Status](https://camo.githubusercontent.com/e15f9e05c241738f3e14c74652da4aa136ded0954963b0a7b9417e3c06798da6/68747470733a2f2f7472617669732d63692e6f72672f7368616767797265632f7068702d687474702d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/shaggyrec/php-http-client)

Api client provide a way to make http request (to rest api, for example) with retrying ability. If response code &gt;= 500, request will be retried several times. First retry in 1 second, second retry in 2 seconds, third retry in 4 seconds and so on, until 256 second limit was reach.

Installation
============

[](#installation)

```
composer require shaggyrec/php-http-client

```

Usage
=====

[](#usage)

```
$response = Shaggyrec\PhpHttpClient\Client::getInstance('https://hostname.com')->post(
    '/path/to/resource',
    $requestJson,
    [
        'option' => '1',
        'anotherOption' => '1',
    ],
    [
        'X-User-Id' => '666'
    ]);

```

### You can use proxy or another options

[](#you-can-use-proxy-or-another-options)

```
    Shaggyrec\PhpHttpClient\Client::getInstance(
        'https://hostname.com',
        ['proxy' => 'http://username:password@ip:port/']
    );

```

Tests
=====

[](#tests)

```
./tests/run.sh

```

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~184 days

Recently: every ~231 days

Total

6

Last Release

1467d ago

PHP version history (2 changes)v1.0.0PHP ^7.2

v1.1.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/24737b181ec7d83d7aab4290706cfce9e251e555cd5b2dc13ba9574482c9b3f7?d=identicon)[shaggyrec](/maintainers/shaggyrec)

---

Top Contributors

[![shaggyrec](https://avatars.githubusercontent.com/u/20976187?v=4)](https://github.com/shaggyrec "shaggyrec (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shaggyrec-php-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/shaggyrec-php-http-client/health.svg)](https://phpackages.com/packages/shaggyrec-php-http-client)
```

###  Alternatives

[async-aws/core

Core package to integrate with AWS. This is a lightweight AWS SDK provider by AsyncAws.

10139.5M66](/packages/async-aws-core)[fresh/centrifugo-bundle

Provides communication with web-socket server Centrifugo in Symfony applications.

83375.3k](/packages/fresh-centrifugo-bundle)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

9230.2k4](/packages/bitrix24-b24phpsdk)

PHPackages © 2026

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