Use JavaScript to execute an API DELETE request

preview_player
Показать описание
To execute a DELETE request to an API, via JavaScript, first identify the data to be deleted.

In our example, we do this through a specific URL that gives us the exact post id that we want to delete.

Once complete, use the fetch function to ping the API for that specific data and delete it by setting the value to our method property (in the video) to "DELETE".

This will remove the data from the existing data structure.

If you guys have questions about what's an API, look at this video,

If you have questions about what a request method is view this video,

The following are videos of how to implement specific methods,

Best,

Fido

-----------------------------------------------------------------------------------------
Follow me on instagram 📸 : @selftaughthustle
*/
Рекомендации по теме
Комментарии
Автор

bro, pls don't use scripttags like that into ur html. And why u using "let" for variables that are const. U don't even need to use ether.

daymenpollet