Open ashikahmed-bd opened 1 year ago
<script setup> import { reactive } from 'vue' import Form from 'vform' const form = reactive(new Form({ phone: null, password: null, })); const onSubmit = async () => { const response = await axios.post('/api/login', form) console.log(response) } </script>
You need to provide the data instead of the full Form instance.
Use this instead const response = await axios.post('/api/login', form.data())
const response = await axios.post('/api/login', form.data())