Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Guzzle PHP Framework

allplayers
October 11, 2012

Guzzle PHP Framework

Guzzle PHP Framework Presentation by Arturo Contreras

allplayers

October 11, 2012
Tweet

More Decks by allplayers

Other Decks in Programming

Transcript

  1. What is Guzzle? - PHP HTTP client framework that allows

    developer to consume restful services and build applications that will utilize those web services. - Created by Michael Dowling, employed at AWS web services
  2. Why the need for guzzle? - Maintainable client. https://github. com/guzzle/guzzle

    - Relatively lightweight. - Extensibility with Symfony2 event-based plugin system. - Not only http client but service client. - Send requests in parallel. - Persistent connections. - Awesomeness.
  3. How to Start - Go to guzzlephp.org - Include .phar

    file or use composer to load guzzle. - Start up a new http client $client = new Client('your url'); - Start consuming your web services.
  4. Plugins - Implements Symfony Event Subscriber Interface. - A bunch

    are included: oauth, basic auth, cookies, logging, hash validation. - Easy to build.
  5. Listening to Events - Easy to latch on to requests

    - Listen for certain response codes - Act on those triggers and retry request - One example, CAPTCHA solving
  6. Validator - Symfony 2 Validator - A number of default

    types are included. - Easily extendable.