Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asp.Net WebApi. HttpPost is default?

Maybe I cannot find manual.

I found experimentally that POST is default acceptance verb if a method does not follow webapi naming convension (Post~~, Get~~) and does not describe verb attribute like [HttpPost] in webapi.

is that right? is there any description about this?

like image 817
Youngjae Avatar asked Sep 05 '25 11:09

Youngjae


1 Answers

That's correct. If the method name doesn't map (through attribute, or convention) to a supported HTTP verb, then the default is POST.

Refer to the answer there

Is there a default verb applied to a Web API ApiController method?

like image 97
Julien Jacobs Avatar answered Sep 08 '25 14:09

Julien Jacobs