Allow adding of subscribers during the Client::factory method.
This is used in a user of this, but it looks like it would have never worked. 🤷♂️
As the HttpClient is hidden from the user, the only options the user has is to attach the subscriber on every request. This makes it available to all requests.
Other options would be to provide some passthrough to the actual http client, or have an attachSubscriber method on the GuzzleClient object.
Allow adding of subscribers during the
Client::factory
method.This is used in a user of this, but it looks like it would have never worked. 🤷♂️
As the
HttpClient
is hidden from the user, the only options the user has is to attach the subscriber on every request. This makes it available to all requests.Other options would be to provide some passthrough to the actual http client, or have an
attachSubscriber
method on theGuzzleClient
object.