title: Routing with optional parameter in web-api
body: <p>Using web-api i go to /api/cat/orders/ </p>
  
  <p>I specified the following routes and controller methods. I expected that the "ApiRouteWithCategoryAndExtId" route and the "GetMessageByCategoryExtId" method would be used since I made "extid" optional. But it is using the default Get method. </p>
  
  <p>(/api/cat/orders/id18 uses GetMessageByCategoryExtId, but then extid is not optional)</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Routes:
  </p>
  
  <pre><code>config.Routes.MapHttpRoute(
      name: "ApiRouteUniqueId",
      routeTemplate: "api/def/{id}",
      defaults: new { id = RouteParameter.Optional, controller = "Default" }
  );
  
  config.Routes.MapHttpRoute(
      name: "ApiRouteWithCategoryAndExtId",
      routeTemplate: "api/cat/{category}/{extid}",
      defaults: new { extid = RouteParameter.Optional, controller = "Default"}
  );
  </code></pre>
  
  <p>Controller:
  </p>
  
  <pre><code>public string Get()
  
  public HttpResponseMessage GetMessageById(int id)
  
  public HttpResponseMessage GetMessageByCategoryExtId(
      string category, string extid)
  </code></pre>