title: C# REST API Controller: same route with 2 different actions
body: <p>When using the following routes:</p>
  
  <pre><code>        config.Routes.MapHttpRoute(
              name: "new_device",
              routeTemplate: "api/v1/devices",
              defaults: new { controller = "Devices", action = "new_device" }
          );
  
          config.Routes.MapHttpRoute(
              name: "devices_list",
              routeTemplate: "api/v1/devices",
              defaults: new { controller = "Devices", action = "devices_list", httpMethod = new HttpMethodConstraint(HttpMethod.Get) }
          );
  </code></pre>
  
  <p>The controller looks as follows:</p>
  
  <pre><code>public class DevicesController : ApiController
  {
      [HttpPost]
      [ResponseType(typeof(IHttpActionResult))]
      [Route("api/v1/devices")]
      [ActionName("new_device")]
      [ValidateModel]
      public IHttpActionResult NewDevice([System.Web.Http.FromBody] Device device )
      {
           ...
      }
  
      [HttpGet]
      [ResponseType(typeof(IHttpActionResult))]
      [Route("api/v1/devices")]
      [ActionName("devices_list")]
      [ValidateModel]
      public List&lt;Device&gt; GetAllDevices()
      {
          ...
      }
  </code></pre>
  
  <p>My expectation would be that the router would find the correct route based on the HttpMethod used since even it's using the same URI it is using a different HttpMethod. </p>
  
  <p>But instead it fails with the following:</p>
  
  <blockquote>
    <blockquote>
      <p>"Message": "The requested resource does not support http method 'GET'."</p>
    </blockquote>
  </blockquote>
  
  <p>My guess is because it fins a match with the URI and then checks if the method if the same.</p>
  
  <p>Is there a way to achieve using the same URI with different Http Method which is by the way REST guidelines? Am I missing something?</p>