PHPackages                             mahelbir/mclient - 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. mahelbir/mclient

ActiveLibrary

mahelbir/mclient
================

Simple async request wrapper for Guzzle

2.1(2y ago)230MITPHPPHP &gt;=7.1

Since Sep 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mahelbir/mclient)[ Packagist](https://packagist.org/packages/mahelbir/mclient)[ Docs](https://github.com/mahelbir/mclient)[ RSS](/packages/mahelbir-mclient/feed)WikiDiscussions master Synced 1mo ago

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

Mclient
=======

[](#mclient)

[![Latest version](https://camo.githubusercontent.com/0cbb3f7877a756115beda2aab4d99d3002f71c4c6c877af424c8191c58b20d9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6168656c6269722f6d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mahelbir/mclient)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Mclient acts as a straightforward asynchronous wrapper around Guzzle for making HTTP requests.

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

[](#requirements)

PHP 7.1+

[Guzzle 7.0+](https://github.com/guzzle/guzzle)

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

[](#installation)

Simply add a dependency on `mahelbir/mclient` to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:

```
composer require mahelbir/mclient
```

Although it's recommended to use Composer, you can actually include files anyway you want.

Usage
-----

[](#usage)

```
$mclient = new \Mahelbir\Mclient();

//Library options
$mclient->setTimeout(10); // total seconds
$mclient->setConnectTimeout(5);
$mclient->setConcurrency(100);

// Async multiple requests
$mclient->request(
    'GET',
    'https://httpbin.org/get',
    ['X-CUSTOM-HEADER' => 'Value'],
    ['proxy' => '127.0.0.1:8080'],
    'request_1_extra_data'
);
$mclient->post(
    'https://httpbin.org/post',
    ['key' => 'value'],
    ['User-Agent' => 'Googlebot'],
    ['allow_redirects' => false],
    'request_2_extra_data'
);
$mclient->post(
    'https://httpbin.org/post',
    '{"key": "value"}',
    ['content-type' => 'application/json']
);
$mclient->get(
    'https://httpbin.org/get?q=1',
    [],
    [],
    [],
    ['request_3_extra_data' => 'value_extra']
);
$mclient->get(
    'https://httpbin.org/get',
    ["q" => 2]
);

// Mclient supports all the request options available in Guzzle, with the addition of an 'interface' option (https://docs.guzzlephp.org/en/stable/request-options.html)
$mclient->get('https://google.com', [], [], ['interface' => '2001:db8:3333:4444:5555:6666:7777:8888']);

$responses = $mclient->execute();
foreach ($responses as $response) {
    $status = $response['code'];
    $body = $response['body'];
    $headers = $response['headers'];
    $request = $response['request'];
    $extra = $response['extra'];
}

// Pass true parameter to retrieve the first/single response
$mclient->get('https://httpbin.org/get');
$response = $mclient->execute(true);
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

Total

3

Last Release

748d ago

Major Versions

1.0 → 2.02024-03-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c0965430562c2a6f1689857fc08880801173f93c925b21da9aa9eb713bdaa7d?d=identicon)[mahelbir](/maintainers/mahelbir)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/mahelbir-mclient/health.svg)

```
[![Health](https://phpackages.com/badges/mahelbir-mclient/health.svg)](https://phpackages.com/packages/mahelbir-mclient)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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