Skip to content

Commit

Permalink
Fix contact form post data
Browse files Browse the repository at this point in the history
  • Loading branch information
H0R5E committed Apr 22, 2024
1 parent b3e163b commit 6dd934a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/routes/contact-form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@
}
try {
const res = await axios.post("https://formspree.io/f/mzbnyrew", form);
const res = await axios.post(
"https://formspree.io/f/mzbnyrew",
form.data,
{
headers: {
Accept: "application/json",
"Content-Type": "application/x-www-form-urlencoded",
},
},
);
console.log(res);
toast.success("Message sent!");
} catch (err) {
Expand Down

0 comments on commit 6dd934a

Please sign in to comment.