2017 © Pedro Peláez
 

library mailgun-guzzle-6

Guzzle is a PHP HTTP client library and framework for building RESTful web service clients

image

zeljkobgd81/mailgun-guzzle-6

Guzzle is a PHP HTTP client library and framework for building RESTful web service clients

  • Thursday, November 5, 2015
  • by zeljkobgd81
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Guzzle, PHP HTTP client and webservice framework

Build Status, (*1)

Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services., (*2)

  • Manages things like persistent connections, represents query strings as collections, simplifies sending streaming POST requests with fields and files, and abstracts away the underlying HTTP transport layer.
  • Can send both synchronous and asynchronous requests using the same interface without requiring a dependency on a specific event loop.
  • Pluggable HTTP adapters allows Guzzle to integrate with any method you choose for sending HTTP requests over the wire (e.g., cURL, sockets, PHP's stream wrapper, non-blocking event loops like ReactPHP.
  • Guzzle makes it so that you no longer need to fool around with cURL options, stream contexts, or sockets.
$client = new GuzzleHttp\Client();
$response = $client->get('http://guzzlephp.org');
$res = $client->get('https://api.github.com/user', ['auth' =>  ['user', 'pass']]);
echo $res->getStatusCode();
// "200"
echo $res->getHeader('content-type');
// 'application/json; charset=utf8'
echo $res->getBody();
// {"type":"User"...'
var_export($res->json());
// Outputs the JSON decoded data

// Send an asynchronous request.
$req = $client->createRequest('GET', 'http://httpbin.org', ['future' => true]);
$client->send($req)->then(function ($response) {
    echo 'I completed! ' . $response;
});

Get more information and answers with the Documentation, Forums, and Gitter., (*3)

Installing via Composer

The recommended way to install Guzzle is through Composer., (*4)

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version of Guzzle:, (*5)

composer.phar require guzzlehttp/guzzle

After installing, you need to require Composer's autoloader:, (*6)

require 'vendor/autoload.php';

Documentation

More information can be found in the online documentation at http://guzzlephp.org/., (*7)

The Versions

05/11 2015

dev-master

9999999-dev http://guzzlephp.org/

Guzzle is a PHP HTTP client library and framework for building RESTful web service clients

  Sources   Download

MIT

The Requires

 

The Development Requires

curl framework rest http client web service http client