CORS error when trying to make a delete request to the backend using react and axios

http://127.0.0.1:8000/api/task/$%7Bid%7D/ 404 (Not Found) is the response, please take note that all CORS settiings has been checked unqustionable times below is the react and axios code

const handleDelete = async (id) => { try{ await axios.delete("http://127.0.0.1:8000/api/task/${id}/") } catch (error) { console.log(error); } }

delete button

<span className='text-xl cursor-pointer'> <MdDeleteOutline onClick={ () => handleDelete(todoItem.id)} /></span>

What makes you think this is a CORS error?

It looks to me like you’re trying to issue a request to this url:

If you’re going to use value interpolation in your JavaScript, the string needs to be enclosed by backtick - ` characters, not quotes - ".

you are a life saver, thank you.