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

076↓37.5%PHP

Since Mar 5Pushed 4mo 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 yesterday

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

21

—

LowBetter than 18% of packages

Maintenance52

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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M91](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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