title: ASP.NET Web Api 2 post request From Uri and From Body
body: <p>I have an ASP.NET Web Api 2 endpoint that is meant to be consumed by diffelerent clients. The endpoint should accept posted data from body as well as from Uri.
  So my question is if it's possible for my POST action to support both type of requests and have the posted data mapped in the POST action?</p>
  
  <p>My solution to the problem is to have exposed two endpoints - one supporting each scenario (see my code below), but I would rather have only one endpoint that I can give to all the clients. How is it possible?</p>
  
  <pre><code>// The Controller Action when data is posted in the Uri:
  
  // POST: api/PostUri
  [HttpPost]
  [ActionName("PostUri")]
  public Result Post([FromUri]Data data)
  {
     // Do something..
  }
  
  // The Controller Action when request is posted with data in the Body:
  
  // POST: api/MyController/PostBody
  [HttpPost]
  [ActionName("PostBody")]
  public Result PostBody(Data data)
  {
     return Post(data);
  }
  </code></pre>