2017 © Pedro Peláez
 

library http-client

Http Client helper trait

image

ebidtech/http-client

Http Client helper trait

  • Tuesday, June 17, 2014
  • by ebidtech
  • Repository
  • 12 Watchers
  • 0 Stars
  • 3,619 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

HTTP Client

Helper trait for creating HTTP Rest clients, (*1)

Latest Stable Version, (*2)

Requirements

  • PHP >= 5.3

Installation

The recommended way to install is through composer., (*3)

Just create a composer.json file for your project:, (*4)

``` json { "require": { "ebidtech/http-client": "@stable" } }, (*5)


**Tip:** browse [`ebidtech/http-client`](https://packagist.org/packages/ebidtech/http-client) page to choose a stable version to use, avoid the `@stable` meta constraint. And run these two commands to install it: ```bash $ curl -sS https://getcomposer.org/installer | php $ composer install

Now you can add the autoloader, and you will have access to the library:, (*6)

<?php

require 'vendor/autoload.php';

Usage

<?php

namespace XXX;

use EBT\HttpClient\CreateTrait as HttpClientCreateTrait;
use Guzzle\Http\Client as GuzzleHttpClient;

class <HttpClient> {
    use HttpClientCreateTrait;

    /**
     * @var GuzzleHttpClient
     */
    private $client;

    ...
    $this->client = $this->create($host, $userAgent, $config);
}

Contributing

See CONTRIBUTING file., (*7)

Credits

License

http-client library is released under the MIT License. See the bundled LICENSE file for details., (*8)

The Versions