1. Get PostMan --
https://www.postman.com/downloads/[
^]
2. Set it up so you can send a Delete to your controller
That will look something like this snapshot: https://i.stack.imgur.com/YIJKz.png
I don't know what port yours will be running on, but notice the URL looks like:
https://localhost:4995/User?id=1
That will hit your UserController and since the method is set to Delete and you have a default Delete action then your Delete method will be hit.
From there, you'll better be able to determine how to send a HTTP Delete to your web site. You can also check out my article here on CP :
.NET Core Web API: The Least You Need To Know (Part 1 of 2)[
^]
Part 2 -- Using XHR (XMLHTTPRequest)
var xhr = new XMLHttpRequest();
xhr.addEventListener("load", transferComplete);
xhr.addEventListener("error", transferFailed);
var url = "https://localhost:4995/User";
function deleteUser(){
xhr.open("DELETE", url);
var userData = {"id":1};
console.log(userData);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(JSON.stringify(userData));
}