feat(experiment): deno:request event in node:http#30746
Open
CertainLach wants to merge 1 commit intodenoland:mainfrom
Open
feat(experiment): deno:request event in node:http#30746CertainLach wants to merge 1 commit intodenoland:mainfrom
CertainLach wants to merge 1 commit intodenoland:mainfrom
Conversation
Contributor
Author
|
Draft until further course of action is suggested by fresh maintainers |
Contributor
Author
|
At the same time, I would like to get feedback from the Deno side. |
CertainLach
commented
Sep 16, 2025
| } | ||
| } | ||
|
|
||
| export class DenoRequestEvent { |
Contributor
Author
There was a problem hiding this comment.
I wanted to use extends Event there so that users would use typical e.preventDefault() pattern, but it seems strange to mix node's EventEmitted with browser events.
It would also require both setting pendingResponse and cancelling the event, instead of just setting the response field
fc0ab3d to
409343a
Compare
409343a to
bf72bdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fresh uses vite in dev mode, and vite uses node:http server for requests
However Fresh itself uses Request/Response objects everywhere, requiring conversions between native and node requests. To avoid that, deno:request event allows access to the original deno request for users of node:http
Fresh counterpart: denoland/fresh#3446
Context: