Today I saw a post from Mr. John Mertic that described how to interact with the new API via cURL. While it’s a great piece of information, I find working with the Guzzle library to be much more efficient due to Guzzle’s support for event listeners. That and I hate working directly with cURL.
That said, lets get down to business and start working with the new API.
First, lets update composer.json to install Guzzle
Next, install the library via composer
Now with Guzzle auto loaded we can start to have our fun with the new API.
As you can see, using Guzzle makes interacting with the new API a breeze and has an added bonus of making the code much easier to understand.
Stay tuned, on my next post I’ll show how you can use the SugarCRM 7 API Wrapper Class to accomplish the same task in just a few lines of code.