2017 © Pedro Peláez
 

library fgc-client

HTTPlug-conformant file_get_contents HTTP client

image

ml/fgc-client

HTTPlug-conformant file_get_contents HTTP client

  • Sunday, April 2, 2017
  • by markus
  • Repository
  • 1 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

file_get_contents HTTP client

Build Status Code Coverage, (*1)

This is a HTTPlug-conformant HTTP client based on file_get_contents., (*2)

Installation

The easiest way to use fgc-client is to integrate it as a dependency in your project's composer.json file:, (*3)

php composer.phar require ml/fgc-client ^1.0

Please note that HTTPlug hasn't released a stable version yet. Thus, for the time being, you need to set the minimum stability in your composer.json file to beta:, (*4)

{
    ...
    "minimum-stability": "beta",
    "require": {
        ...
}

Usage

After having installed the desired dependencies, (*5)

php composer.phar require guzzlehttp/psr7 ^1.0 php-http/message ^0.2

issuing an HTTP request is quite straightforward:, (*6)

require_once('vendor/autoload.php');

use Http\Message\MessageFactory\GuzzleMessageFactory;
use Http\Message\StreamFactory\GuzzleStreamFactory;
use ML\FgcClient\FgcHttpClient;

$messageFactory = new GuzzleMessageFactory();
$client = new FgcHttpClient($messageFactory, new GuzzleStreamFactory());

$request = $messageFactory->createRequest('GET', 'http://example.com/');
$response = $client->sendRequest($request);

echo $response->getStatusCode();

The Versions

02/04 2017

dev-master

9999999-dev http://www.markus-lanthaler.com

HTTPlug-conformant file_get_contents HTTP client

  Sources   Download

MIT

The Requires

 

The Development Requires

https rest http file_get_contents web api httplug php-http

03/01 2016

1.0.1

1.0.1.0 http://www.markus-lanthaler.com

HTTPlug-conformant file_get_contents HTTP client

  Sources   Download

MIT

The Requires

 

The Development Requires

https rest http file_get_contents web api httplug php-http

03/01 2016