I have written a WebApi controller that contains the following method for deleting a client...
[HttpDelete]
public void DeleteClient(int id) {
// do stuff here
}
...and am trying to test it by using the following HTML on a web page...
<form method="DELETE" action="/api/ClientsXml/">
<table style="padding: 5px">
<tr>
<td>ID</td>
<td><input type="text" size="20" name="id" id="id" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Send" /></td>
</tr>
</table>
</form>
However, the DeleteClient method is never called. It passes the request through to the GetClient method instead.
Anyone any idea why? I've tried all sorts of variations, but I just can't get the delete method called.