Skip to content

re: Building HTTP clients with Guzzle VIEW POST


I'd prefer writing an own http client interface and an adapter to guzzle.


So you basically have an example 2/3 in mind but decoupling guzzle with http-plug, right?


I re-read the post and realized you were talking about integration, heh. I'll extend my comment a bit. So yes, i would write an adapter for Guzzle. If i didn't have to write that integration myself and the case would be using a library like twitteroauth then adapter again with a TwitterApi interface or something.

In case of writing the integration myself i'd be still trying my best to make it irrelevant that i'm using guzzle or even a http client at all. After all, the client probably only cares about the data that the integration provides. This is pretty speculative as i haven't really gotten around to build any kind of meaningful abstraction over these kinds of integrations.

code of conduct - report abuse