PHPackages                             evaisse/simple-http-bundle - 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. evaisse/simple-http-bundle

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

evaisse/simple-http-bundle
==========================

A very simple symfony http client bundle built on the httpfoundation component (instead of guzzle), using cURL and cURL multi.

v3.7.0(4mo ago)4180.2k11[5 PRs](https://github.com/evaisse/SimpleHttpBundle/pulls)MITPHPPHP ^8.0

Since Jun 16Pushed 4mo ago4 watchersCompare

[ Source](https://github.com/evaisse/SimpleHttpBundle)[ Packagist](https://packagist.org/packages/evaisse/simple-http-bundle)[ Docs](https://github.com/evaisse/SimpleHttpBundle)[ RSS](/packages/evaisse-simple-http-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (100)Used By (0)

SimpleHttpBundle
================

[](#simplehttpbundle)

### While Still maintained, I recommand you to replace this bundle with the [symfony/http-client](https://github.com/symfony/http-client) with has better support and a handy plug-in support.

[](#while-still-maintained-i-recommand-you-to-replace-this-bundle-with-the-symfonyhttp-client-with-has-better-support-and-a-handy-plug-in-support)

A symfony2/3/4/5 http client bundle built on the httpfoundation component (instead of guzzle), using cURL as engine.

[![Coverage Status](https://camo.githubusercontent.com/edd0967c96faae0c2518dcd93e026cdb24dfa62b259b98ad65d97bebef6b80a0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f657661697373652f53696d706c654874747042756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/evaisse/SimpleHttpBundle?branch=master)

Quickstart
==========

[](#quickstart)

Get the simple API

```
$http = $this->container->get('http');
$http = $this->get('http');

// same as

try {
    $http->GET('http://httpbin.org/ip'); // yeah, that's all.
} catch (\Symfony\Component\HttpKernel\Exception\HttpException $e) {
    // handle errors
}

try {
    $data = $http->POST('http://httpbin.org/post', $myArgs);
} catch (\Symfony\Component\HttpKernel\Exception\HttpException $e) {
    // handle errors
}
```

Easy routing with replacement syntax (similar to php frameworks like symfony2/laravel)

```
$data = $http->GET('http://httpbin.org/status/{code}', array(
    "code" => 200
));
// will call http://httpbin.org/status/200

$data = $http->GET('http://httpbin.org/status/{code}', array(
    "code" => 200,
    "foo" => "bar"
));
// will call http://httpbin.org/status/200?foo=bar
```

Development features
====================

[](#development-features)

The simple http bundle provide you a nice profiler toolbar addition

- Request/Response body &amp; headers details
- Cookies handy panel
- External debug links (to remote profiler using X-Debug-Link header)
- Request timing displayed in the timeline panel

Replay feature
--------------

[](#replay-feature)

Add this to routing.yml file

```
_simple_http:
    resource: "@SimpleHttpBundle/Controller/"
    type:     annotation
    prefix:   /_profiler/simple-http

```

or

```
_simple_http:
    resource: '@SimpleHttpBundle/Resources/config/routing.yml'

```

You can now resend an http call directly from the profiler debug panel

Panels details
--------------

[](#panels-details)

!\[Panels details\] ()

Toolbar block
-------------

[](#toolbar-block)

!\[Toolbar block\] ()

Timeline panel
--------------

[](#timeline-panel)

!\[Timeline panel\] ()

Complete API
============

[](#complete-api)

Complete api using transaction factory

```
$transac = $http->prepare('GET', 'http://httpbin.org/ip');

$transac->execute();
```

Parrallel execution

```
$a = $http->prepare('GET', 'http://httpbin.org/ip');
$b = $http->prepare('PUT', 'http://httpbin.org/put');
$c = $http->prepare('POST', 'http://httpbin.org/post');

$http->execute([
    $a,
    $b,
    $c
]);

$a->hasError() || $a->getResult();
$b->hasError() || $b->getResult();
$c->hasError() || $c->getResult();
```

JSON services

```
print $http->prepare('POST', 'http://httpbin.org/ip', $_SERVER)
           ->json()
           ->execute()
           ->getResult()['ip'];
```

File upload

```
$http->prepare('PUT', 'http://httpbin.org/put')
     ->addFile('f1', './myfile.txt')
     ->addFile('f2', './myfile.txt')
     ->execute();

$http->prepare('POST', 'http://httpbin.org/post', [
        'infos' => 'foo',
        'bar'   => 'so so',
    ])
     ->addFile('f1', './myfile.txt')
     ->addFile('f2', './myfile.txt')
     ->execute();
```

Cookies persistance

```
$a = $http->prepare('GET',  'http://httpbin.org/ip');
$b = $http->prepare('PUT',  'http://httpbin.org/put');
$c = $http->prepare('POST', 'http://httpbin.org/post');

$cookies = $http->getDefaultCookieJar();
 // $cookies = $http->getCookieJar($session); if you want to directly store in user session

$http->execute([
    $a,
    $b,
    $c
], $cookies);

dump($cookies);
```

Promise usage

```
$stmt = $http->prepare('PUT', 'http://httpbin.org/put')

$stmt->onSuccess(function ($data) {
    // handle data
})->onError(function (\Symfony\Component\HttpKernel\Exception\HttpException $e) {
    // handle errors
})->onFinish(function () {
    // like "finally"
});

$http->execute([
    $stmt
]);
```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance74

Regular maintenance activity

Popularity34

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 55.9% 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 ~46 days

Recently: every ~23 days

Total

84

Last Release

145d ago

Major Versions

v0.3.8 → v2.0.12017-02-02

v2.2.7 → v3.0.02020-01-06

v2.2.9 → v3.0.42020-02-12

v2.2.10 → v3.0.72020-03-11

v2.2.11 → v3.0.92020-05-15

PHP version history (5 changes)v0.1.0PHP &gt;=5.3.3

v0.3.0PHP &gt;=5.5.0

v2.2.0PHP &gt;=5.6.0

v3.0.0PHP &gt;=7.2

v3.1.7PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f8765f0d4bc19fa776ddc03f0eb9aad8c1f2ed72e3e0b9164ff3f496c6fb001?d=identicon)[evaisse](/maintainers/evaisse)

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

---

Top Contributors

[![evaisse](https://avatars.githubusercontent.com/u/28737?v=4)](https://github.com/evaisse "evaisse (76 commits)")[![ryden54](https://avatars.githubusercontent.com/u/4123392?v=4)](https://github.com/ryden54 "ryden54 (28 commits)")[![lahaxearnaud](https://avatars.githubusercontent.com/u/1364221?v=4)](https://github.com/lahaxearnaud "lahaxearnaud (15 commits)")[![ymorocutti](https://avatars.githubusercontent.com/u/6350559?v=4)](https://github.com/ymorocutti "ymorocutti (10 commits)")[![giann](https://avatars.githubusercontent.com/u/584398?v=4)](https://github.com/giann "giann (2 commits)")[![Jc-lechalier](https://avatars.githubusercontent.com/u/3379288?v=4)](https://github.com/Jc-lechalier "Jc-lechalier (1 commits)")[![chaouchAbderraouf](https://avatars.githubusercontent.com/u/14640773?v=4)](https://github.com/chaouchAbderraouf "chaouchAbderraouf (1 commits)")[![tatai92](https://avatars.githubusercontent.com/u/7385474?v=4)](https://github.com/tatai92 "tatai92 (1 commits)")[![VincentC7](https://avatars.githubusercontent.com/u/47385922?v=4)](https://github.com/VincentC7 "VincentC7 (1 commits)")[![Atirbal](https://avatars.githubusercontent.com/u/834884?v=4)](https://github.com/Atirbal "Atirbal (1 commits)")

---

Tags

httpclientsymfonycurlSimplerequestshttpfoundationcurlmulti

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/evaisse-simple-http-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/evaisse-simple-http-bundle/health.svg)](https://phpackages.com/packages/evaisse-simple-http-bundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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