Delete not supported?
See original GitHub issueHi
I keep getting “DELETE http://localhost:54690/api/Storage/Delete 415 (Unsupported Media Type)” when I try to use axios delete.
export const axiosInstant = axios.create({
baseURL: 'http://localhost:54690/api',
timeout: 10000,
headers: { 'Content-Type': 'application/json' }
});
export function deleteSelectedStorage(storage) {
return function (dispatch) {
return axiosInstant.delete('/Storage/Delete', { storage: storage}).then(function () {
dispatch({
type: actions.SELECTED_STORAGE_DELETED,
payload: {
selectedStorage: storage
}
});
});
}
}
am I doing something wrong?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Spring - 405 Http method DELETE is not supported by this URL
This will work: @RequestMapping(value = "/{authorizationUrl}", method = DELETE) @ResponseBody public void deleteAuthorizationServer( ...
Read more >The DELETE method is not supported spring boot
using Angular 8 and Springboot app… passing value through JSON getting error: Request delete doesn't supported here is the error :.
Read more >The DELETE method is not supported for this route - Laracasts
I get this error whenever I hit the delete button to delete a thread. The DELETE method is not supported for this route....
Read more >The DELETE method is not supported for this route In Laravel ...
The DELETE method is not supported for this route In Laravel 8 Solution. 1.1K views 1 year ago MATHURA · Programming Experience.
Read more >Method delete is not supported #497 - inertiajs/inertia - GitHub
Instead, what I'm assuming is happening, is that you're using the DELETE method to an endpoint/URL that, as the message is already informing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I know what’s going on. You are trying to make a request with a body using
axios#delete
which does not accept request body as a parameter. Please try to userequest
method instead:So @chobo2 can basically use:
right?