-
Notifications
You must be signed in to change notification settings - Fork 850
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
Add streaming methods to Service infra #1155
Conversation
* Defaults to false. | ||
* @param null|string $base base URL (e.g. 'https://api.stripe.com') | ||
*/ | ||
protected function expectsRequestStream( |
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.
Should we add a test that uses this? Maybe on Quotes?
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.
Yes, I will rebase latest-codegen
after this is merged, and that PR contains such a test.
Wanted to separate out the infra stuff in this PR vs. the actual quotes-related functionality.
7f14244
to
0ab0d03
Compare
dffe20a
to
95093c4
Compare
r? @dcr
|
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.
LGTM! Thanks Richard!
r? @dcr-stripe
#1143 was sufficient for adding Streaming support to
CurlClient
This PR adds analogous methods onto
AbstractStripeService
,BaseStripeClient
and such.Adding
requestStream
ontoHttpClient\ClientInterface
directly would technically be a breaking change, so I am now exposing separate interfaces forrequestStream
andrequest
, and I store two separate references on ApiRequestor.Changelog
setStreamingHttpClient
andstreamingHttpClient
toApiRequestor
getStreamingClient
andrequestStream
toAbstractService
requestStream
toBaseStripeClient
\Stripe\RequestOptions::parse
now clones its input if it is already aRequestOptions
object, to prevent accidental mutation.