sveltekit-superforms
sveltekit-superforms copied to clipboard
how to set additional header data when we submit the form ?
i want to set additional header data when i submit the form // method: 'POST', mode: 'cors', headers: { 'Content-Type': 'application/json', 'x-csrftoken': csrfcookie() } credentials: 'include',
Superforms uses the SubmitFunction from SvelteKit in onSubmit, so I don't think this is possible. Extra data can be sent with formData or in the action URL instead.
This is possible now with customRequest!