PHPackages                             leafs/fetch - 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. leafs/fetch

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

leafs/fetch
===========

Plain simple PHP http client

v0.3(5mo ago)83.6k↑25%1MITPHP

Since Jun 4Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/leafsphp/fetch)[ Packagist](https://packagist.org/packages/leafs/fetch)[ Docs](https://github.com/leafsphp/redis)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-fetch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

 [![](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)](https://camo.githubusercontent.com/d98ee5e32c2ff016fdfdac6c42654a908f4cc34b229c7b00caacc5a717455ae8/68747470733a2f2f6c6561667068702e6465762f6c6f676f2d636972636c652e706e67)

Fetch
=====

[](#fetch)

[![Latest Stable Version](https://camo.githubusercontent.com/f134a6d3c642a5de52cc87b582646352ee181d092fe17ae67e51e3d5cbce3593/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f66657463682f762f737461626c65)](https://packagist.org/packages/leafs/leaf)[![Total Downloads](https://camo.githubusercontent.com/e558950ed0d1f9a11cce8fbc422247583ef69a41e734c5d716aa38cf145b56a7/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f66657463682f646f776e6c6f616473)](https://packagist.org/packages/leafs/leaf)[![License](https://camo.githubusercontent.com/62b81f3751793745f31c55466a03262c963fca984b2aa36f1cd592da256e1985/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f66657463682f6c6963656e7365)](https://packagist.org/packages/leafs/leaf)

When building your applications, you will probably end up needing to call APIs or fetch data from external sources. Leaf provides a simple and easy way to do this using Fetch. Fetch provides a clean and modern interface for making network requests in PHP. It is inspired by JavaScript's Fetch API, Axios and uses elements from Unirest PHP.

fetch example
-------------

[](#fetch-example)

```
$res = fetch('https://jsonplaceholder.typicode.com/todos/');

// data returned is saved in the $data property just like axios
response()->json($res->data);
```

You can also use the entire fetch object to make requests:

```
$res = fetch()->post('https://jsonplaceholder.typicode.com/posts', [
  'title' => 'foo',
  'body' => 'bar',
  'userId' => 1
]);

fetch()->put(...);
fetch()->patch(...);
fetch()->delete(...);
fetch()->options(...);

response()->json($res->data);
```

*Fetch is still in its early stages and is being actively developed. If you have any issues or suggestions, please feel free to open an issue or a pull request.*

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

[](#installation)

You can quickly install leaf fetch with the Leaf CLI

```
leaf install fetch
```

Or with composer:

```
composer require leafs/fetch
```

Stay In Touch
-------------

[](#stay-in-touch)

- [Twitter](https://twitter.com/leafphp)
- [Join the forum](https://github.com/leafsphp/leaf/discussions/37)
- [Chat on discord](https://discord.com/invite/Pkrm9NJPE3)

Learning Leaf PHP
-----------------

[](#learning-leaf-php)

- Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf.
- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics
- You can also learn from [codelabs](https://leafphp.dev/codelabs/) and contribute as well.

Contributing
------------

[](#contributing)

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.

Sponsoring Leaf
---------------

[](#sponsoring-leaf)

We are committed to keeping Leaf open-source and free, but maintaining and developing new features now requires significant time and resources. As the project has grown, so have the costs, which have been mostly covered by the team. To sustain and grow Leaf, we need your help to support full-time maintainers.

You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.

And to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance73

Regular maintenance activity

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% 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 ~827 days

Total

3

Last Release

154d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29547806?v=4)[Mychi](/maintainers/Mychi)[@mychi](https://github.com/mychi)

---

Top Contributors

[![mychidarko](https://avatars.githubusercontent.com/u/26604242?v=4)](https://github.com/mychidarko "mychidarko (24 commits)")[![tautvilas](https://avatars.githubusercontent.com/u/1044090?v=4)](https://github.com/tautvilas "tautvilas (1 commits)")

---

Tags

fetchhttp-clientleafleafphphttpphpclientnetworkxhrleaffetch

### Embed Badge

![Health badge](/badges/leafs-fetch/health.svg)

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

###  Alternatives

[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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