-
Notifications
You must be signed in to change notification settings - Fork 577
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
Update body parsing and file streaming exemples #1128
base: master
Are you sure you want to change the base?
Conversation
Don't remove examples. Esp. not when the substitute is slower:
It might look as "unoptimized code" to you, but it's not. Sure, there is a missing call to cork(), so you could add that call. |
I updated the body parsing example, you should get better performance. About changes: |
We don't optimize for size, we optimize for speed. And examples should show the best way for speed. If you want to optimize for size, use Express. |
I see, but it's not really newcomer friendly, the body parsing example was the one that makes me doubt to use uWS.js, it makes it look so hard just to parse the body. If performance is realy the main point and as parsing request body is an important feature, we could add a parseBody or onParsedBody function directly on the HttpResponse c++ wrapper. |
As a newcomer, these examples were difficult to understand and adapt to my needs.
There were missing cork() calls and unoptimized code.
So I share these complete examples that are simpler and more understandable.