Skip to content

Add flexible http client #11

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

Merged
merged 1 commit into from
Feb 3, 2016
Merged

Add flexible http client #11

merged 1 commit into from
Feb 3, 2016

Conversation

joelwurtz
Copy link
Member

A flexible http client implements both interface and can emulate one of the contract if not present in the injected http client.

@joelwurtz joelwurtz mentioned this pull request Jan 31, 2016
5 tasks
throw new \LogicException('Client must be an instance of Http\\Client\\HttpClient or Http\\Client\\HttpAsyncClient');
}

$this->httpAsyncClient = $client;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor logical thing: the Sync client decorator is used first, it is checked first for type. We should maintain this order in the rest of the object.

@sagikazarmark
Copy link
Member

Nice 👍

@joelwurtz joelwurtz force-pushed the http-client-flexible branch from c245496 to 3e957e8 Compare February 3, 2016 23:20
joelwurtz added a commit that referenced this pull request Feb 3, 2016
@joelwurtz joelwurtz merged commit 28ec435 into master Feb 3, 2016
@sagikazarmark sagikazarmark deleted the http-client-flexible branch March 29, 2016 21:22
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