What you are seeing is an expected behavior. Action Selector in Web API by default assumes the action to be of verb POST
if the action name does not have a prefix with verbs like "Get", "Post", "Put", "Delete" etc.
Now it isn't working even if you have specified [PUT("Statuses/{siteId}")]
attribute explicitly because, Action selector looks for attributes from System.Web.Http
namespace like HttpGetAttribute, HttpPostAttribute, HttpPutAttribute etc.
Since AttributeRouting's PUTAttribute isn't of the above types, Action selector doesn't consider it and still thinks it to be the default one, which is POST
. So your workaround of having HttpPut
attribute is correct.