Get the authenticity token, this should be used to send it in a submit.
let token = useAuthenticityToken();let submit = useSubmit();function sendFormWithCode() { submit( { csrf: token, ...otherData }, { action: "/action", method: "post" }, );} Copy
let token = useAuthenticityToken();let submit = useSubmit();function sendFormWithCode() { submit( { csrf: token, ...otherData }, { action: "/action", method: "post" }, );}
Get the authenticity token, this should be used to send it in a submit.