-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Rename Server to StreamingServer #197
Comments
Wouldn't hurt, but on the other side everybody using react should meanwhile be aware that he's in async wonderland. Would we be able to- instead of having two servers for sync and async- detect string context on a I wouldn't expect sync return values at all from this package but- especially for the client- it might be handy to return an entire body instead of in parts. |
True, very true. No I'm doubt whether we should rename or not, but that's what we have this issue for 😄 .
Effectively the server from #198 would wrap the
And with sync values I more meant a complete ready to use PSR-7 request, as multiple people expressed their concerns about in #28 . |
I concur, I'm not opposed, but how much would be gained by this BC break?
Not sure how reasonable this would be. The basic idea is that buffering a streaming body is relatively easy, while streaming a buffered body is actually impossible. As such, my view would be to stick with streaming by default and provide an easy to use API to leverage buffering.
I understand that a number of people are concerned about a lack of interoperability, but shouldn't this point be moot if we provide a buffering API that is specifically aimed at achieving interoperability? As an alternative, what do you think about basing this on top of middlewares (via #179) an provding some kind of API sugar like this:
|
Mainly a clearer distinction between the two servers if we go for two. But there is no need for a change if we go the route you proposed at the end of your comment.
That would work, doing the same in @php-api-clients where buffering is just a middleware in the HTTP client 👍 .
IMHO the interoperability is a welcome side affect of something that was planned before PSR-7 support came into the code base. |
@WyriHaximus Do you feel this ticket is still relevant now that #179 is in via #215? It's my understanding that the current |
During the discussion in #28 it came up that users might expect a PSR-7 request to be sync and with the body fully downloaded, parsed and ready to be used. The default
Server
inreact/http
this isn't the case. Thus renaming it toStreamingServer
, making theServer
workings more obvious, is IMHO the way to go.The text was updated successfully, but these errors were encountered: