We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've implemented the following in https://github.com/Hebilicious/form-actions-nuxt
export async function getRequestFromEvent(event: H3Event) { const url = new URL(getRequestURL(event)) const method = getMethod(event) const body = method === "POST" ? await readRawBody(event) : undefined return new Request(url, { headers: getRequestHeaders(event) as any, method, body }) } export async function getFormData(event: H3Event) { return (await getRequestFromEvent(event)).formData() }
Which directly enables great DX around forms :
const eventHandler = event => { const formData = await getFormData(event) const email = formData.get("email") as string const password = formData.get("password") as string return { email } }
The text was updated successfully, but these errors were encountered:
readFormData
Hebilicious
Successfully merging a pull request may close this issue.
Describe the feature
I've implemented the following in https://github.com/Hebilicious/form-actions-nuxt
Which directly enables great DX around forms :
Additional information
The text was updated successfully, but these errors were encountered: