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

[Feature Request] Support Response and Request #401

Closed
4 tasks done
Hebilicious opened this issue Jun 8, 2023 · 2 comments
Closed
4 tasks done

[Feature Request] Support Response and Request #401

Hebilicious opened this issue Jun 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Hebilicious
Copy link
Member

Hebilicious commented Jun 8, 2023

Describe the feature

H3 can be inconvenient to work with in environments that are not Node.js based, such as cloudflare, lagon, vercel-edge etc

  • An alternative API toevent.node, event.request would be more natural to use.
  • An way to return a native Response from an event handler would be great.

Example :

defineEventHandler(event => {
console.log(event.request) //... Request object
console.log(event.node) //... undefined
return new Response("Hello world") // Works as intended 
} )

Additionally, it should be possible to return a Response in node environments as well.

Additional information

  • Would you be willing to help implement this feature?

Tasks

  1. enhancement ready
  2. enhancement webstd
    pi0
@pi0
Copy link
Member

pi0 commented Jul 10, 2023

Response return support implemented by #436

@Hebilicious Hebilicious added the enhancement New feature or request label Jul 13, 2023
@Hebilicious Hebilicious pinned this issue Jul 25, 2023
@pi0 pi0 unpinned this issue Jul 25, 2023
@pi0
Copy link
Member

pi0 commented Jul 27, 2023

Thanks so much for putting efforts to push this ❤️ Let's track last part with #458 👍🏼

@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants