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

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

phpsoftbox/http-client
======================

PSR-18 HTTP client implementation for the PhpSoftBox framework

059↑150%PHP

Since Mar 5Pushed 2mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Http Client
===========

[](#http-client)

About
-----

[](#about)

`phpsoftbox/http-client` — базовая реализация PSR-18 клиента, построенная на cURL. Компонент принимает PSR-17 фабрики ответа и стрима и возвращает `ResponseInterface`.

Ключевые особенности:

- минимальная обвязка вокруг cURL без внешних зависимостей;
- поддержка любых методов и заголовков;
- возможность передать дополнительные `CURLOPT_*` через конструктор;
- исключения PSR-18 при сетевых ошибках.

Quick Start
-----------

[](#quick-start)

```
use PhpSoftBox\Http\Client\HttpClient;
use PhpSoftBox\Http\Message\RequestFactory;
use PhpSoftBox\Http\Message\ResponseFactory;
use PhpSoftBox\Http\Message\StreamFactory;

$client = new HttpClient(
    new ResponseFactory(),
    new StreamFactory(),
    [
        CURLOPT_CONNECTTIMEOUT_MS => 1000,
        CURLOPT_TIMEOUT_MS => 5000,
    ],
);

$response = $client->post(
    'https://api.example.com/v1/ping',
    '{"ping":true}',
    ['Content-Type' => 'application/json'],
);

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

// Если нужно отключить проверку SSL:
$insecureClient = $client->withoutSslVerification();
```

Ошибки
------

[](#ошибки)

- `NetworkException` — сетевые ошибки (PSR-18 `NetworkExceptionInterface`).
- `HttpClientException` — ошибки инициализации клиента.

Интеграции
----------

[](#интеграции)

Клиент можно напрямую передавать в компоненты, ожидающие PSR-18:

```
$telegram = new \PhpSoftBox\Telegram\Api\TelegramClient(
    token: $_ENV['TELEGRAM_BOT_TOKEN'],
    httpClient: $client,
    requestFactory: new RequestFactory(),
    streamFactory: new StreamFactory(),
);
```

Требования
----------

[](#требования)

- PHP 8.4+
- расширение `ext-curl`

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance57

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (1 commits)")

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

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

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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