it's been several day that i am working on this issue.
i have sent my data by 'Content-Type': 'multipart/form-data' and i can see it in my request:
-----------------------------393374356923066383831416984
Content-Disposition: form-data; name="priority_id"
1
-----------------------------393374356923066383831416984
Content-Disposition: form-data; name="department_id"
3
-----------------------------393374356923066383831416984--
but it responds that the required data hasn't been sent:
department_id [ " please enter department id" ]
priority_id [ " please enter priority_id" ]
and this is my code:
the header i have set:
headers: {
'Accept': 'application/json',
'Content-Type': 'multipart/form-data'
},
the way i am sending data:
const FormData = require('form-data');
const data = new FormData();
data.append('priority_id', '1');
data.append('department_id', '3');
this.$store
.dispatch("modules/create",data)
this api works with Postman form-data table
it would be great if someone can help me with it.