2017 © Pedro Peláez
 

library buzy

Web client on top of Symfony2 HTTP foundation

image

grom/buzy

Web client on top of Symfony2 HTTP foundation

  • Friday, May 25, 2012
  • by GromNaN
  • Repository
  • 0 Watchers
  • 0 Stars
  • 265 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Buzy is an HTTP client for PHP built on top of Symfony2 components

This is a work in progress project. The goal is to build an efficient and robust library on top of Symfony2 HttpFoundation (Request and Response)., (*1)

Unit tested with PHPUnit Build Status, (*2)

Todo:, (*3)

  • HTTP cache listener to skip not necessary requests.
  • CURL client
  • Proxy support
  • History listener
  • Logger listener

Requirements

  • PHP 5.3 +
  • Symfony HttpFoundation
  • Symfony EventDispatcher
  • Symfony BrowserKit (for CookieJar)
  • Curl Extension (not yet)

Usage


$browser = new Buzy\Browser(); $response = $browser->get('http://www.google.com'); echo $response;

You can also use the low-level HTTP classes directly., (*4)


$request = Symfony\Component\HttpFoundation\Request::create('http://google.com', 'GET'); $response = new Symfony\Component\HttpFoundation\Response(); $client = new Buzy\Client\FileGetContents(); $client->send($request, $response); echo $request; echo $response;

Simple reverse proxy

With this 5 lines of code, you can re-send a request and transfert the response., (*5)


use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Buzy\Browser; $request = Request::createFromGlobals(); $request->server->set('HTTP_HOST', 'internal-server'); $browser = new Browser(); $response = $browser->send($request); $response->send(); // The response is sent back to the client

Licence

Original code base is extracted from Buzz library written by Kris Wallsmith., (*6)

This library is shared under MIT licence. See LICENCE file., (*7)

The Versions

25/05 2012

dev-master

9999999-dev

Web client on top of Symfony2 HTTP foundation

  Sources   Download

The Requires

 

The Development Requires

by Jérôme Tamarelle

25/05 2012

v0.0.2

0.0.2.0

Web client on top of Symfony2 HTTP foundation

  Sources   Download

The Requires

 

The Development Requires

by Jérôme Tamarelle

06/05 2012

v0.0.1

0.0.1.0

Web client on top of Symfony2 HTTP foundation

  Sources   Download

The Requires

 

The Development Requires

by Jérôme Tamarelle

01/05 2012

dev-curl

dev-curl

Web client on top of Symfony2 HTTP foundation

  Sources   Download

The Requires

 

by Jérôme Tamarelle