saxulum / saxulum-http-client-adapter-buzz
Saxulum Http Client Adapter Buzz
Installs: 1 958
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: >=5.3
- kriswallsmith/buzz: ~0.13
- saxulum/saxulum-http-client-interface: ~1.1
Requires (Dev)
- phpunit/phpunit: ~4.0
Provides
This package is not auto-updated.
Last update: 2020-09-22 19:08:05 UTC
README
Features
- Provides a http client interface adapter for buzz
Requirements
- PHP 5.3+
- Buzz ~0.13
Installation
Through Composer as saxulum/saxulum-http-client-adapter-buzz.
Usage
use Saxulum\HttpClient\Buzz\HttpClient;
use Saxulum\HttpClient\Request;
$httpClient = new HttpClient();
$response = $httpClient->request(new Request(
'1.1',
Request::METHOD_GET,
'http://en.wikipedia.org',
array(
'Connection' => 'close',
)
));
You can inject your own buzz browser instance while creating the http client instance.
use Buzz\Browser;
use Saxulum\HttpClient\Buzz\HttpClient;
$browser = new Browser;
$httpClient = new HttpClient($browser);