Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscribers in factory #35

Merged
merged 1 commit into from
Jan 2, 2018
Merged

subscribers in factory #35

merged 1 commit into from
Jan 2, 2018

Conversation

h-bragg
Copy link
Contributor

@h-bragg h-bragg commented Dec 13, 2017

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.

when calling the Client::factory method, allow the config option 'subscribers' to attach
to the emitter
@h-bragg h-bragg merged commit 1d908f0 into guzzle-5 Jan 2, 2018
@h-bragg h-bragg deleted the g-5-subscribers-factory branch January 2, 2018 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants