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

Abandoned → [initphp/http](/?search=initphp%2Fhttp)ArchivedLibrary[HTTP &amp; Networking](/categories/http)

initphp/http-client
===================

Psr18 HTTP Client Library (DEPRECATED — merged into initphp/http:^2.2)

1.0.1(1mo ago)08MITPHPPHP &gt;=7.4

Since Jul 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/InitPHP/HTTPClient)[ Packagist](https://packagist.org/packages/initphp/http-client)[ RSS](/packages/initphp-http-client/feed)WikiDiscussions main Synced today

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

InitPHP HTTP Client
===================

[](#initphp-http-client)

> ## ⚠️ DEPRECATED — Use [`initphp/http`](https://github.com/InitPHP/HTTP) instead
>
> [](#️-deprecated--use-initphphttp-instead)
>
> As part of the InitPHP package consolidation, **this package has been merged into [`initphp/http`](https://github.com/InitPHP/HTTP) starting with version 2.2.** The consolidated package ships its own PSR-18 client that talks to `ext-curl` directly — no separate cURL wrapper is required.
>
> This repository is kept read-only for historical reference. **No further updates will be released.**
>
> ### Why this package no longer works
>
> [](#why-this-package-no-longer-works)
>
> The standalone `\InitPHP\HTTPClient\Client` was written against `initphp/http:^1.x`, which used the flat `\InitPHP\HTTP\*` namespace. In `initphp/http:^2.0` those classes moved to `\InitPHP\HTTP\Message\*`, so this package's `use` statements no longer resolve. It is effectively broken against any current version of `initphp/http`.
>
> ### Migration
>
> [](#migration)
>
> Drop the dependency and use the canonical client shipped in `initphp/http`:
>
> ```
> - "initphp/http-client": "^1.0",
> - "initphp/http": "^1.0",
> + "initphp/http": "^2.2"
> ```
>
>
>
> Code change:
>
> ```
> // Before
> use InitPHP\HTTPClient\Client;
> use InitPHP\HTTP\Request;
>
> $client   = new Client(['timeout' => 0]);
> $request  = new Request('GET', 'https://example.com');
> $response = $client->sendRequest($request);
>
> // After
> use InitPHP\HTTP\Client\Client;
> use InitPHP\HTTP\Message\Request;
>
> $client   = new Client();
> $request  = new Request('GET', 'https://example.com');
> $response = $client->sendRequest($request);
> ```
>
>
>
> See the [HTTP README — Migrating from `initphp/http-client`](https://github.com/InitPHP/HTTP#migrating-from-initphphttp-client) for option-by-option translation notes.

---

It is HTTP Client library following Psr-18 standards. It uses cURL for HTTP requests.

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

[](#requirements)

- PHP 7.4 or higher
- [Psr-18 HTTP Client Interface Package](https://github.com/php-fig/http-client)
- [InitPHP HTTP Library](https://github.com/InitPHP/HTTP)
- [InitPHP Curl Library](https://github.com/InitPHP/Curl)

In the above libraries themselves; It can have dependencies such as libcurl.

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

[](#installation)

```
composer require initphp/http-client

```

Usage
-----

[](#usage)

```
require_once "vendor/autoload.php";
use InitPHP\HTTPClient\Client;

/** @var \Psr\Http\Client\ClientInterface $client */
$client = new Client();

/** @var \Psr\Http\Message\RequestInterface $request */
$request = new \InitPHP\HTTP\Request('GET', 'https://www.example.com');

/** @var \Psr\Http\Message\ResponseInterface $response */
$response = $client->sendRequest($request);
```

Getting Help
------------

[](#getting-help)

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

Getting Involved
----------------

[](#getting-involved)

> All contributions to this project will be published under the MIT License. By submitting a pull request or filing a bug, issue, or feature request, you are agreeing to comply with this waiver of copyright interest.

There are two primary ways to help:

- Using the issue tracker, and
- Changing the code-base.

### Using the issue tracker

[](#using-the-issue-tracker)

Use the issue tracker to suggest feature requests, report bugs, and ask questions. This is also a great way to connect with the developers of the project as well as others who are interested in this solution.

Use the issue tracker to find ways to contribute. Find a bug or a feature, mention in the issue that you will take on that effort, then follow the Changing the code-base guidance below.

### Changing the code-base

[](#changing-the-code-base)

Generally speaking, you should fork this repository, make changes in your own fork, and then submit a pull request. All new code should have associated unit tests that validate implemented features and the presence or lack of defects. Additionally, the code should follow any stylistic and architectural guidelines prescribed by the project. In the absence of such guidelines, mimic the styles and patterns in the existing code-base.

Credits
-------

[](#credits)

- [Muhammet ŞAFAK](https://www.muhammetsafak.com.tr) &lt;&gt;

License
-------

[](#license)

Copyright © 2022 [MIT License](./LICENSE)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance92

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

40d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b6b34f3ac8938d8ee52ba3bd260680855dc5715c7b2929d9380de30d15a67dd?d=identicon)[muhammetsafak](/maintainers/muhammetsafak)

---

Top Contributors

[![muhammetsafak](https://avatars.githubusercontent.com/u/104234499?v=4)](https://github.com/muhammetsafak "muhammetsafak (3 commits)")

### Embed Badge

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

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[laudis/neo4j-php-client

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

185702.8k44](/packages/laudis-neo4j-php-client)

PHPackages © 2026

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