Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Latest commit

 

History

History
49 lines (35 loc) · 1.67 KB

File metadata and controls

49 lines (35 loc) · 1.67 KB

saxulum-http-client-adapter-vinelab

Build Status Total Downloads Latest Stable Version Scrutinizer Code Quality

Features

  • Provides a http client interface adapter for vinelab

Requirements

  • PHP 5.3+
  • Vinelab ~1.1 (PHP 5.4+)

Installation

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

Usage

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

use Vinelab\Http\Client;
use Saxulum\HttpClient\Vinelab\HttpClient;

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