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

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

dadapas/http-client
===================

The psr-18 implementation for HTTP Clients

1.0.0(3y ago)00MITPHPPHP &gt;=7.2

Since Jun 9Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (3)Used By (0)

HTTP Client
-----------

[](#http-client)

This is a implementation of psr-18 of php-fig

Basic usage
===========

[](#basic-usage)

To get a simple request

```
use Dadapas\Http\Client as HttpClient;
use Dadapas\Http\Request;
use Dadapas\Http\Exception\HttpException;

try {
	$client = new HttpClient;

	// Make a get request to google
	$request = new Request('GET', "https://www.google.com")
		->withHeader('Content-Type', 'text/html');

	// Return the response to the $response variable
	$response = $client->sendRequest($request);

} catch (HttpException $e) {

	echo $e->getMessage();
}
```

Method of response class are

```
$response->status();   // Ok
$response->code() ;    // 200
$response->json();     // Return an array of application empty array instead
$response->toString(); // to get the response to string
```

You can then pick one of the implementations of the interface to get a logger.

If you want to implement the interface, you can require this package and implement `Psr\Http\Message\RequestInterface`, `Psr\Http\Message\ResponseInterface`, `Psr\Http\Message\StreamInterface`, `Psr\Http\Message\UriInterface` and in your code. Please read the [PSR-7 http messages](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md) and [PSR-18 http client](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-18-http-client.md)for details.

Test
====

[](#test)

For making a test just

```
composer test
```

License
=======

[](#license)

The licence is MIT for more details click [here](LICENCE)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

2

Last Release

1422d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/456979997044b4a0b274d30db252afec25d17cfe5fcdda66d75460562e4fa0f6?d=identicon)[Dadapas](/maintainers/Dadapas)

---

Top Contributors

[![Dadapas](https://avatars.githubusercontent.com/u/9548602?v=4)](https://github.com/Dadapas "Dadapas (24 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[laudis/neo4j-php-client

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

184616.9k31](/packages/laudis-neo4j-php-client)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[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)
