-
Notifications
You must be signed in to change notification settings - Fork 56
Add documentation for HTTP Client router #103
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
Conversation
and sent using the appropriate client. If there is no matching client, an exception is thrown. | ||
|
||
This allows to inject a single client into multiple services, | ||
but under the hood there can be clients configured for each of them:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/there can be clients configured for each of them/, different clients can be used for different requests/
i think the injecting into multiple services is not the only use case. it is useful even if a single service should use different clients for different urls. maybe with a special plugin to work around server bugs, or only authenticating requests to a protected sub-path but not to the public part of an api...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the injecting into multiple services is not the only use case
It was one use case I though of, but there are of course other use cases as well. I think we should pick the two or three most common onces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would first say the generic thing, and then have a new sentence with some examples what this allows to do.
this looks stale. can we wrap this up, mark? |
I will try to find some time for this during the weekend. |
ping ;-) |
684e6e7
to
52fb541
Compare
Improved the example and added a note about the PluginClient. Not sure if it is better this way though. |
HTTP Client Router | ||
------------------ | ||
|
||
This client accepts pairs of clients (both sync and async) and request matchers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(both sync and async)
Is that needed? It makes the sentence harder to read.
96147d2
to
d24a98c
Compare
Any more comments? |
/** @var \Psr\Cache\CacheItemPoolInterface $pool */ | ||
$pool... | ||
/** @var \Http\Message\StreamFactory $streamFactory */ | ||
$streamFactory... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$pool = ...
$streamFactory = ..
I had a minor comment, But Im good to merge with or without that fix. Thank you |
d24a98c
to
9eca7ce
Compare
Anything else here? |
Nope (or not ATM) |
No description provided.