-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Streaming API #31
Streaming API #31
Conversation
👍 API looks a little bit clunky, but it seems like the best way given the promise API. |
@@ -122,6 +122,8 @@ public function send(Request $request) | |||
)); | |||
} | |||
}); | |||
|
|||
$deferred->progress(array('responseStream' => $response, 'requestStream' => $requestStream)); |
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.
nit: have constants defined on Sender
instead of these strings? (Part of public API.)
I'm not even going to argue on this :-) Thanks for your feedback, much appreciated! I'd like to get this in rather sooner than later (because other libs depend on this feature). I'm not a fan of the API, hence the statement in the README. I'm looking forward to introduce a breaking change as soon as we figure out a better API 👍 |
For the reference: This API is subject to change because it takes advantage of the dreaded promise progress API (reactphp/promise#32). The fetch standard API (#30) might be a good alternative. |
First draft. API is subject to change in future versions.
Closes #26.