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

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

ajayvohra2005/hack-http-client
==============================

HTTP client implementation in Hack language

v0.9.0(4y ago)02MITHack

Since Nov 5Pushed 4y agoCompare

[ Source](https://github.com/ajayvohra2005/hack-http-client)[ Packagist](https://packagist.org/packages/ajayvohra2005/hack-http-client)[ Docs](https://github.com/ajayvohra2005/hack-http-client.git)[ RSS](/packages/ajayvohra2005-hack-http-client/feed)WikiDiscussions main Synced today

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

Hack HTTP client
================

[](#hack-http-client)

Overview
--------

[](#overview)

This project implements an HTTP Client in [Hack](https://docs.hhvm.com/hack/).

- Simple HTTP Client interface
- Synchronous and asynchronous requests
- Middleware support

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

[](#requirements)

HHVM 4.132 and above.

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

[](#installation)

- Git clone this repository
- Install [composer](https://getcomposer.org/)
- In the root directory of this repository, run the command

    ```
      composer install

    ```

To use this package,

```
    composer require ajayvohra2005/hack-http

```

Running Tests
-------------

[](#running-tests)

Testing uses a mock HTTP server written in [Node.js](https://nodejs.org/en/). The project was tested with Node.js version v17.0.1. After installation of Node.js and this project, run the following command in the root directory of this repository:

```
    ./vendor/bin/hacktest tests/

```

Quick Start Example
-------------------

[](#quick-start-example)

```
use namespace HackHttp\Message as HM;
use namespace HackHttp\Client as HC;

function quick_start(): void
{
  require_once(__DIR__.'/../vendor/autoload.hack');
  \Facebook\AutoloadMap\initialize();

  $client = new HC\Client();
  // Send a synchronous request.
  $response = $client->request('GET', 'https://docs.hhvm.com/hack/');

  echo $response->getStatusCode(); // 200
  echo $response->getHeaderLine('content-type'); // 'text/html'
  echo $response->getBody()->__toString(); // ...

  // Send an asynchronous request.
  $request = new HM\Request('GET', 'http://httpbin.org');
  $promise = $client->sendAsync($request)->then( (mixed $response): void ==> {
      if($response is HM\Response) {
        echo 'I completed! ' . $response->getBody()->__toString();
      }
  });

  $promise->wait();
}

```

License
-------

[](#license)

Hack Http package is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.

Acknowledgements
----------------

[](#acknowledgements)

The [Guzzle, PHP HTTP Client](https://github.com/guzzle/guzzle) and [PSR-7 Message Implementation](https://github.com/guzzle/psr7) projects inspired this code.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

1647d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

httpclienthackhacklang

### Embed Badge

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

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

###  Alternatives

[m6web/guzzle-http-bundle

Symfony bundle on top of Guzzle

17511.5k2](/packages/m6web-guzzle-http-bundle)[swoole/etcd-client

Grpc PHP Client base on Swoole Http2 Coroutine

1973.2k1](/packages/swoole-etcd-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)

PHPackages © 2026

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