You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a .NET based HTTP streaming api that I need to integrate on my larval based PHP server application. I have been using Guzzle for it but it is blocking my entire server because of the infinite while loop I had to place. I was exploring this library but I am encountering issues with it. The streaming api is built in a way that it requires a GET HTTP call which redirects to the streaming URL.
@theiosdevguy Thanks for your patience and welcome to ReactPHP 🎉
The way this API seems to works means you may have to manually follow the redirect by sending a new request to the address given in the Location header. There are plans to support this automatically in the future via #20.
Once you send a request to this ServerSentEvents API, you should see individual chunks coming in via the data events. Parsing this shouldn't be too hard, given that SSE uses a very simple text-based protocol. This implementation is likely out of scope for this project, but we're happy to hear back if you happen to have an implementation for this!
I have a .NET based HTTP streaming api that I need to integrate on my larval based PHP server application. I have been using Guzzle for it but it is blocking my entire server because of the infinite while loop I had to place. I was exploring this library but I am encountering issues with it. The streaming api is built in a way that it requires a GET HTTP call which redirects to the streaming URL.
Example - GET http://192.168.1.25:4590 (with Auth headers)
Response - Redirects to http://192.168.1.25:4591 (Streaming API)
The problem I am facing is that when I do a GET to http://192.168.1.25:4590, I see no chunk of data in
In fact, the logs suggest that
$response->on('end', function() { echo 'DONE'; });
is called right away.
Please suggest a mechanism to integrate such a streaming api. Or may be the right question here should be how to handle HTTP redirects?
The text was updated successfully, but these errors were encountered: