What is the default behaviour of a controller action not marked with AcceptVerbs, HttpGet or HttpPost?
问题 If I create a controller action and do not decorate it with AcceptVerbs , HttpPost or HttpGet . What is the default behaviour? Does the action allow any access method or does it default to GET ? 回答1: It's accessible via any verb. 回答2: In Web API 2.1: it depends on the name of the action. If the action starts with "Get*" then it will default to only accept GET requests. If it starts with "Put*" then it will default to only accept PUT requests. Same with POST. If it doesn't start with any known