Easy HTTP Clients with Guzzle
With application architectures such as REST increasingly making use of web services, sending HTTP requests from PHP has become a common requirement. With this in mind a reusable component that can talk HTTP for us has become a must.
Originating as part of the AWS SDK for PHP Guzzle is a library that has become a popular choice and is now integrated into several other projects including Drupal 8. What makes Guzzle so attractive for developers is as well as acting as a versatile HTTP Client it offers a framework to tailor clients to a particular web service by describing them in Guzzle’s own DSL.
Starting with a REST like service we want to talk to, this talk will go through the process of building a HTTP client that allows the interaction with the remote resources in a robust and elegant way. Writing just enough code to specify the client and along the way offering plenty of tips on how to unit test and extend your client and also how best to integrate it within your application.