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

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

brainweb/http-client
====================

A simple HTTP client with retry logic and error logging

v1.0.0(5mo ago)01MITPHPPHP ^8.5CI passing

Since Dec 10Pushed 5mo agoCompare

[ Source](https://github.com/PavelStrejcek/HTTP-Client)[ Packagist](https://packagist.org/packages/brainweb/http-client)[ RSS](/packages/brainweb-http-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

HTTP Client
===========

[](#http-client)

A simple, extensible HTTP client for PHP 8.5 with automatic retry logic and comprehensive error logging.

Features
--------

[](#features)

- **Automatic Retry**: Configurable retry strategy with exponential backoff
- **Non-linear Delays**: Exponential delay increase with optional jitter to prevent thundering herd
- **Comprehensive Logging**: All error states are logged with context
- **Clean Architecture**: Follows SOLID principles, easily extensible
- **PSR Compliant**: Follows PSR-4 autoloading and PSR-3 inspired logging
- **Fully Tested**: Comprehensive unit test coverage

Requirements
------------

[](#requirements)

- PHP 8.5+
- cURL extension
- Docker &amp; Docker Compose (for development)

Installation
------------

[](#installation)

### Via Composer (Recommended for usage)

[](#via-composer-recommended-for-usage)

```
composer require brainweb/http-client
```

### For Development

[](#for-development)

### Using Docker (Recommended for development)

[](#using-docker-recommended-for-development)

1. Clone the repository and navigate to the project directory:

```
cd httpclient
```

2. Start the Docker container:

```
docker compose up -d
```

3. Install dependencies:

```
docker compose exec php composer install
```

### Without Docker

[](#without-docker)

If you have PHP 8.5+ installed locally:

```
composer install
```

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

[](#quick-start)

```
