saxulum/saxulum-http-client-adapter-guzzle

This package is abandoned and no longer maintained. No replacement package was suggested.

Saxulum Http Client Adapter Guzzle

1.0.2 2014-10-24 19:30 UTC

This package is not auto-updated.

Last update: 2020-09-22 19:10:11 UTC


README

Build Status Total Downloads Latest Stable Version Scrutinizer Code Quality

Features

  • Provides a http client interface adapter for guzzle

Requirements

  • PHP 5.3+
  • Guzzle ~5.0 (PHP 5.4+)

Installation

Through Composer as saxulum/saxulum-http-client-adapter-guzzle.

Usage

use Saxulum\HttpClient\Guzzle\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 guzzle client instance while creating the http client instance.

use GuzzleHttp\Client;
use Saxulum\HttpClient\Guzzle\HttpClient;

$client = new Client;
$httpClient = new HttpClient($client);