Skip to content
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

[helpers] add missing helpers #420

Closed
1 task done
Hebilicious opened this issue Jul 2, 2023 · 1 comment
Closed
1 task done

[helpers] add missing helpers #420

Hebilicious opened this issue Jul 2, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request helpers ready

Comments

@Hebilicious
Copy link
Member

Hebilicious commented Jul 2, 2023

Describe the feature

Some helpers that are missing from h3, and require users to explicitly rely on event.node.

We should provide the following helpers as a part of the migration to #73

Once everything is covered, we can start deprecating event.node usage for end-users, as they should not rely on node agnostic API for their needs.

Header :

  • removeResponseHeaders
  • removeResponseHeader
  • getRequestRawHeader
  • getResponseHeaders
  • getResponseHeader

Response :

  • sendResponse

URL :

  • setOriginalUrlPath
  • getOriginalUrlPath
  • setUrlPath
  • getUrlPath
  • getRequestPath

Note specific :

  • nodeResWritableEnded (event.node.res.writableEnded)

Reference for implementation and test https://github.com/Hebilicious/h3/pull/2/files

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented Jul 27, 2023

I think now we have most missing utils as event.[] props. Let's see what is missing in the future.

@pi0 pi0 closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request helpers ready
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants