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

Access standardized Response and Request types #344

Closed
1 task done
septatrix opened this issue Feb 25, 2023 · 1 comment
Closed
1 task done

Access standardized Response and Request types #344

septatrix opened this issue Feb 25, 2023 · 1 comment

Comments

@septatrix
Copy link

Describe the feature

Modern JS provides types for responses and requests which some libraries built upon. An example is @auth/core to which one passes the requests and sends back the response created by it.

Currently I am trying to manufacture requests manually from the incoming request and manually copy all the headers, status information and body from the generated response though this is cumbersome and error-prone. I also tried using event.respondWith though that does not seem to work (and even then one has to create a H3Response - though it is prettier than calling all the setHeader etc functions).

This is by the way in the context of using Nuxtjs server API routes.

Additional information

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

pi0 commented Feb 27, 2023

Linking to #73

@pi0 pi0 closed this as completed Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants