PHPackages                             camoo/curl-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. camoo/curl-http-client

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

camoo/curl-http-client
======================

Simple Curl Http Client

1.1.4(1y ago)05.6k↑80.7%5MITPHPPHP &gt;=8.0

Since Dec 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/camoo/curl-http-client)[ Packagist](https://packagist.org/packages/camoo/curl-http-client)[ Docs](https://www.camoo.hosting)[ RSS](/packages/camoo-curl-http-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (14)Used By (5)

curl-http-client
================

[](#curl-http-client)

Simple Curl Http Client build with the clean code architecture approach. PSR-7 standard

 [ ![Build Status](https://github.com/camoo/curl-http-client/actions/workflows/unittest.yml/badge.svg) ](https://github.com/camoo/curl-http-client) [ ![camoo-badge](https://camo.githubusercontent.com/9f1e2d1869a5d069711d640ae5281e1812c9cf23499227cb6b4d38751cb9a068/68747470733a2f2f636f6465636f762e696f2f67682f63616d6f6f2f6375726c2d687474702d636c69656e742f6272616e63682f6d61696e2f67726170682f62616467652e737667) ](https://codecov.io/gh/camoo/curl-http-client)

Usage
-----

[](#usage)

### without dependency injection

[](#without-dependency-injection)

```
use Camoo\Http\Curl\Infrastructure\Client;
use Camoo\Http\Curl\Domain\Entity\Configuration;

$configuration = Configuration::create();

// activate debug
// $configuration->setDebug(true);
$client = new Client($configuration);

$uri = 'https://api.example.com/v1/users';

$response = $client->get($uri);

$status = $response->getStatusCode();
$body = (string)$response->getBody();

// get all headers
$headers = $response->getHeaders();

// get single header
$header = $response->getHeader('foo');

// get status code
$code = $response->getStatusCode();
```

### With dependency injection

[](#with-dependency-injection)

```
## in Module
use Camoo\Http\Curl\Domain\Client\ClientInterface;
use Camoo\Http\Curl\Infrastructure\Client;

$this->bind(ClientInterface::class)->to(Client::class);

## in Adapter port

final class TemplateRepository implements TemplateRepositoryInterface
{
    private const URI = 'https://api.example.com/v2/template';
    private const SUCCESS_STATUS = 201;

    public function __construct(private readonly ClientInterface $client)
    {
    }

    public function save(Template $template): bool
    {
        $response = $this->client->post(self::URI, $template->toArray());
        return $response->getStatusCode() === self::SUCCESS_STATUS;
    }

    public function getById(string $id): Template
    {
        $uri = self::URI. '?id=' . $id;
        $response = $this->client->get($uri);
        if ($response->getStatusCode() !== self::SUCCESS_STATUS){
            throw new NotFoundTemplate(sprintf('Template with id %s not found!', $id));
        }
        $body = (string)$response->getBody();
        return Template::fromArray(json_decode($body, true));
    }
    # ...
}
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

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

Recently: every ~122 days

Total

12

Last Release

567d ago

### Community

Maintainers

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

---

Top Contributors

[![camoo](https://avatars.githubusercontent.com/u/24289021?v=4)](https://github.com/camoo "camoo (16 commits)")

---

Tags

http clientcurl-clientSimple Http ClientPSR-7 http-client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/camoo-curl-http-client/health.svg)

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

###  Alternatives

[psr/http-client

Common interface for HTTP clients

1.7k680.7M2.1k](/packages/psr-http-client)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M440](/packages/kriswallsmith-buzz)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[simpod/clickhouse-client

PHP ClickHouse Client

19116.7k](/packages/simpod-clickhouse-client)[amphp/http-client-psr7

PSR-7 adapter for Amp's HTTP client.

1454.7k4](/packages/amphp-http-client-psr7)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)

PHPackages © 2026

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