PHPackages                             spacetab-io/harmony-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. spacetab-io/harmony-http-client

ActiveLibrary

spacetab-io/harmony-http-client
===============================

Asynchronous http client

1.0.1(6y ago)051MITPHPPHP &gt;=7.3

Since Dec 28Pushed 6y agoCompare

[ Source](https://github.com/spacetab-io/harmony-http-client-php)[ Packagist](https://packagist.org/packages/spacetab-io/harmony-http-client)[ RSS](/packages/spacetab-io-harmony-http-client/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (9)Versions (9)Used By (1)

Http-Client
===========

[](#http-client)

[![Latest Stable Version](https://camo.githubusercontent.com/9b2782e900a801510b5e54f95ea735231d052c08bc5979fac4b10464342642ad/68747470733a2f2f706f7365722e707567782e6f72672f6861726d6f6e79696f2f687474702d636c69656e742f762f737461626c65)](https://packagist.org/packages/harmonyio/http-client)[![Build Status](https://camo.githubusercontent.com/b6427ccd42b934eddd9d8c4fced2fdf7779585a4c8c175672861272164002ab3/68747470733a2f2f7472617669732d63692e6f72672f4861726d6f6e79494f2f487474702d436c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/HarmonyIO/Http-Client)[![Build status](https://camo.githubusercontent.com/dd9fafa23579691e50564ff6db460083dc409ab2ef1b077887675951453a023a/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f716533766f6c786a35707871616775752f6272616e63682f6d61737465723f7376673d74727565)](https://ci.appveyor.com/project/PeeHaa/http-client/branch/master)[![Coverage Status](https://camo.githubusercontent.com/704950b119b34faf5be305d84f0a37102588c72d1d775de1b1d63a9606300a25/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4861726d6f6e79494f2f487474702d436c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/HarmonyIO/Http-Client?branch=master)[![License](https://camo.githubusercontent.com/9ebb2bf56abc21d77eb237b85a3de4757452d60642f76271c366ecd0fcd419bc/68747470733a2f2f706f7365722e707567782e6f72672f6861726d6f6e79696f2f687474702d636c69656e742f6c6963656e7365)](https://packagist.org/packages/harmonyio/http-client)

Async caching aware http client

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

[](#requirements)

- PHP 7.3+
- Redis (if wanting to use the Redis caching provider)

In addition for non-blocking context one of the following event libraries should be installed:

- [ev](https://pecl.php.net/package/ev)
- [event](https://pecl.php.net/package/event)
- [php-uv](https://github.com/bwoebi/php-uv)

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

[](#installation)

```
composer require harmonyio/http-client

```

Usage
-----

[](#usage)

### Caching requests

[](#caching-requests)

The following example shows how to make a request and cache the result so consecutive calls will used the cached results instead of making a new external HTTP call.

```
