title: WebApi binding a single parameter from body (form-urlencoded)
body: <p>I would like to understand why in case when there is only one parameter in the POST body, for content type url-formencoded the syntax is different than in case of multiple parameters.</p>
  
  <p>Let's assume we've got these 2 methods with matching route templates:</p>
  
  <pre><code>public string PostSingleString([FromBody]string value)
  {
      return value;
  }
  
  public class Values
  {
      public string Value1 {get; set;}
      public string Value2 {get; set;}
  }
  
  public string PostMultipleStrings(Values values)
  {
      return String.Format("{0}-{1}", values.Value1, values.Value2);
  }
  </code></pre>
  
  <p>In the first case the request would be:</p>
  
  <pre><code>POST    [controller]/
  body: =myValue
  </code></pre>
  
  <p>in the second one though:</p>
  
  <pre><code>POST    [controller]/
  body: Value1=one&amp;Value2=two
  </code></pre>
  
  <p>If in the first case the syntax from the second example is used (<code>value=myValue</code>) the param won't bind (unless the string is wrapped in a complex type).</p>
  
  <p>Can anyone explain why this is the case?</p>