Building HTTP clients with Guzzle
Sep 4, 2018 · 1 min read
Whenever you’re integrating some external service that exposes an HTTP API, you’ll end up building a client to interact with that service.
There’re many different ways to build these http clients although the 3 most common approaches I encountered are listed below.
Which one do you prefer? Do you have any alternatives? Discuss.
1. Creating a client class that extends guzzle.

2. Creating a client class that handles all the logic and calls guzzle.

3. Creating a client class where all the logic is handled by guzzle middleware.

