add app json headers

This commit is contained in:
Kseninia Mikhaylova 2024-06-07 14:22:02 +03:00
parent 26a6537071
commit 3898bb333e
1 changed files with 5 additions and 2 deletions

View File

@ -34,15 +34,18 @@ const validate = () => {
}
}
const submit = (e: any) => {
modal_phone.value = ''
isModalOpen.value = false
fetch(`${apiBase}/custom_request/`, {
method: 'post',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: "from site",
phone: modal_phone.value
})
})
modal_phone.value = ''
isModalOpen.value = false
}
</script>
<template>