Replies: 2 comments
-
What's wrong with doing this? class MyHttpResponse {
constructor(httpResponse) {
this.httpResponse = httpResponse;
}
setHeader(key, value) {
httpResponse.writeHeader(key, value);
}
}
new MyHttpResponse(httpResponse); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for response. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @alexhultman
Can modify
res
andreq
at initialization or with likeapp.__proto__.res
?Like this possible? I couldn't find any related issue
Doing this when request (modify in handler possible, but very bad performance) drops performance by 2x-3x which not good
Allowing users modify
HttpResponse
andHttpRequest
allows doing more complex stuff with small loss of performance instead of 2-3x performance :)UPD 1: I improved performance by handling when needed, now my requests almost 30-40% slower than uWebSockets.js, but it's still slow (but fastest Node.js server framework after uWebSockets.js with Connect/Express-like API with schema support)
UPD 2: You can see my lib at here, i already linked this library as i'm made on top of uWebSockets.js
Beta Was this translation helpful? Give feedback.
All reactions