-
Notifications
You must be signed in to change notification settings - Fork 22
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 #15
Comments
Hi @gustavnikolaj, glad you enjoyed, having a solid and simple use case was our main goal. The package we've been developing that motivated interceptor also does buffering (we need the whole HTML and change it at once) but definitely streaming can make a strong use case, and thinking of the internals it seems possible, some suggestion on the API for it? Also, in case you are using ZenHub we are experimenting with prioritizing issues using +1 :) |
As for the API I'd wish that it could be as simple as adding another method, along side intercept, called interceptStream. But I'm not sure that would be enough. livestyle which @Munter mentioned in #6 uses the streaming functionality of express-hijackresponse, to inject a script tag in html. I cannot see if it would fit into how you're doing things, or if you need the kind of granular control that express-hijackresponse gives you. |
I will humbly plug my own module here, https://github.com/gustavnikolaj/hijackresponse, which is the spiritual successor to express-hijackresponse. It works much in the same way, and allows you to solve the more demanding problems that the abstraction in express-interceptor does not let you get into. I think that there's room for both modules, as express-interceptor might be a lot simpler to get into for people with less demanding use cases. And I can't really see how we could provide people with the power of hijackresponse, while keeping the abstraction simple in express-interceptor. |
You're totally right @gustavnikolaj, I think both modules can coexists. The idea of I'll be adding hijackresponse to our readme file, explaining differences between both modules. |
@gustavnikolaj a link to your module and a recommendation if users have problems with streaming was added to our readme 👍. Closing this for now. |
@p1nox Thanks. express-hijackresponse is sort of deprecated now that hijackresponse is out. It's the exact same API, but without monkey patching the response object. :-) https://github.com/papandreou/express-hijackresponse#deprecation-notice |
Hi!
I just merged a pull-request in express-jsxtransformer from @fer8a. This module looks very nice and solves the problem that express-highjackresponse solves in a much prettier way. There's only one problem, and that is the lack of support for streaming.
It's not a problem for modules like express-jsxtransformer, as that is buffering up stuff any way, but it would be nice to see it solved.
Do you have any plans about supporting streaming as well?
/cc @papandreou
The text was updated successfully, but these errors were encountered: