title: Using same UriTemplate attribute for POST and GET operations WCF REST C#
body: <p>I am getting a "Method not allowed." error from my WCF service when invoking a GET operation. I know why this is happening but can't understand why it is not allowed. I guess I might be doing something wrong. I am trying to use the same UriTemplate (attribute) structure for GET and POST. I am following a standard REST service convention:</p>
  
  <pre><code>GET - /api/v1/{entityType} - to get a list of {entityType} e.g. /api/v1/cars
  POST - /api/v1/{entityType} - to insert an entity e.g /api/v1/car
  </code></pre>
  
  <pre class="lang-cs prettyprint-override"><code>[OperationContract]
  [WebGet(BodyStyle = WebMessageBodyStyle.Bare, 
          ResponseFormat = WebMessageFormat.Json, 
          UriTemplate = "api/v1/{entityType}?skip={skip}&amp;take={take}")]
  List&lt;Entity&gt; GetEntityList(string entityType, int skip, int take);
  
  [OperationContract]
  [WebInvoke(Method = "POST", 
              BodyStyle = WebMessageBodyStyle.Bare, 
              ResponseFormat = WebMessageFormat.Json, 
              RequestFormat = WebMessageFormat.Json, 
              UriTemplate = "api/v1/{entityType}")]
  Entity InsertEntity(string entityType, Entity entity); 
  </code></pre>
  
  <p>I understand that my UriTemplates are the same but why is this not allowed? Doesn't the server detect what operation I am trying to perform?</p>