In laravel
or some express.js
libs add middleware to check if a field is given called _Method
which will override the actual http method of the http request on arrival of the server, because the browser only supports POST
and GET
.
Does ASP.NET (.NET Framework)
contain a build-in middleware like those I just mentioned, I couldn't find anything online.
If so, how do I use it or do you know such an atricle.
If not, how can I create such a middleware myself.
I could not create one myself, because the HttpRequest
in the HttpContext
is readonly
and the HttpMethod
in the HttpRequest
is readonly
aswell.
Or is the only choice to use preventDefault()
and/or ajax
to send (for example) a DELETE
request via javascript
?