I am using vuejs + nuxtjs when i try to delete record using axios post it given the cors policy error and it given 405 method not found my url is like below which i used for delete functionality.
In my browser headers given like this Request URL: http:///remove_homework_file/573 Request Method: OPTIONS Status Code: 405 METHOD NOT ALLOWED Remote Address: 52.76.74.61:80 Referrer Policy: no-referrer-when-downgrade
My delete code is like below.
return axios.post(http://<url>/remove_homework_file/573, {
params: {
sbtoken: localStorage.getItem('token'),
class_session_id: 573,
line_id:33
},
jsonrpc: 2.0,
method: 'call'
}).then(function (response) {
//currentObj.output = response.data;
})
.catch(function (error) {
//currentObj.output = error;
});
We already used axios post,delete,xmlhttprequest all given 405 what should we do? I didn't get any response it always given me 405 method not allowed.Can you please help for this?
post,delete,patchmethods. Can you please include the route setup? - rkg