forked from semicognitive/sveltekit-modal
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I was trying to make form action work, i was trying to to make it work thought the hook.server
import type { Handle } from "@sveltejs/kit"
export const handle = (async ({ event, resolve }) => {
if (event.request.method === "POST") {
const _url = event.request.url.split("?/")
const url = _url[0]
const action = _url[1]
event.request = new Request(url, event.request)
// Send it to the python server....
// find a way to resolve and return the data, from the python server...
}
const resp = await resolve(event)
return resp
}) satisfies Handle
currently with this code we can intercept the post request from the form and send it to the python server , the problem is the how to return the correct response.
I was thinking we can talk about ...how to handle the form actions with python
Metadata
Metadata
Assignees
Labels
No labels