A light-weight HTTP library for PHP5.3. Provides a client and some URL utils.
Extracted from 99designs/ergo.
composer require 99designs/ergo-http
.
$client = new \Ergo\Http\Client(new \Ergo\Http\Url($host));
$response = $client->get($path);
echo $response->getBody();
To install dependancies via Composer:
$ composer install --dev
Run the test suite:
$ phpunit
PHPUnit 3.7.38 by Sebastian Bergmann.
Configuration read from /home/vagrant/ergo-http/phpunit.xml.dist
...................................................
Time: 149 ms, Memory: 5.00Mb
OK (51 tests, 163 assertions)
Used in several high-volume production websites, including 99designs.com, flippa.com, learnable.com and sitepoint.com.