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

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

jdwx/http-client
================

A simple PHP module for HTTP clients.

v1.1.0(1y ago)014MITPHPPHP &gt;=8.3.0

Since Mar 28Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (7)Versions (11)Used By (0)

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

[](#http-client)

Module for PHP HTTP clients. Builds as much as possible off of PSR without introducing dependencies on any specific HTTP client implementation.

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

[](#installation)

You can require it directly with Composer:

```
composer require jdwx/http-client
```

Or download the source from GitHub:

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

[](#requirements)

This module requires PHP 8.3 or later.

Usage
-----

[](#usage)

This module doesn't really do anything on its own. It provides simple implementations of the PSR HTTP client interfaces, which can be useful for testing or for providing a base implementation that can be extended by other modules.

It also provides RequestDecorator and ResponseDecorator classes that can be used to modify requests and responses that implement RequestInterface and ResponseInterface respectively. This allows adding functionality without tying yourself to a specific HTTP client implementation.

The best usage example is the Response class, which inherits ResponseDecorator and adds some commonly-used functionality for working with HTTP responses.

Here is a basic usage example of using the Response class:

```
use JDWX\HttpClient\Response;

$client = new \Some\Http\Client();
$response = $client->request('GET', 'https://api.example.com/resource');
$httpResponse = new Response($response);
if (!$httpResponse->isSuccess()) {
    $statusCode = $httpResponse->getStatusCode();
    echo "Error: HTTP Status {$statusCode}\n";
    exit(1);
}
if (!$httpResponse->isContentType('application/json')) {
    echo "Error: Expected JSON response, got: " . $httpResponse->getContentType() . "\n";
    exit(1);
}
$data = json_decode( $httpResponse->body(), true );
var_dump( $data );
```

Stability
---------

[](#stability)

This module is designed to stick as closely as possible to the PSR HTTP client interfaces, so it should be fairly stable. Additional functionality may be somewhat more likely to evolve over time as more use cases are encountered.

History
-------

[](#history)

This module was refactored out of code adapted from the jdwx/json-api-client module in early 2025 and then extensively modified to conform to various PSR interfaces wherever possible.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance46

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

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

Total

10

Last Release

412d ago

### Community

Maintainers

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

---

Top Contributors

[![jdwx](https://avatars.githubusercontent.com/u/2722779?v=4)](https://github.com/jdwx "jdwx (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)

PHPackages © 2026

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