#POSTing to a function results in no response

4 messages · Page 1 of 1 (latest)

plucky rivet
#

I'm using a form action to post to my function

<form method="POST" action="/functions/send-email"

However Wrangler keeps erroring with "No response"

My function is:

export async function onRequest() {
  return Response.redirect('/')
}

Please tell me what I'm doing wrong

#

Ah sorry tag should be "Pages" not "Workers"

errant forge
#

Shouldn't the action be "/send-email" and not "/functions/send-email"?

plucky rivet
#

Well I never