title: How to catch g-recaptcha-response in ASP.NET ApiController?
body: <p>I am trying to post the form with ReCaptcha to ApiController.</p>
  
  <pre><code>&lt;form&gt;
      &lt;label for="name"&gt;Name:&lt;/label&gt;
      &lt;input id="name" name="name" &gt;&lt;br/&gt;    
      &lt;label for="email"&gt;Email:&lt;/label&gt;
      &lt;input id="email" name="email" type="email" &gt;&lt;br/&gt;
      &lt;div class="g-recaptcha" data-sitekey="some_site_key"&gt;&lt;/div&gt;
      &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;
  
  &lt;script src="https://www.google.com/recaptcha/api.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(function () {
          $('form').submit(function (event) {
              var data = $('form').serialize();
              console.log('form data: ', data);
              $.post("api/test", data,
                  function (data) {
                  alert('success');
              });
              event.preventDefault();
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Form the <code>console.log()</code> statement, I can see the values posted are under names of <strong>name</strong>, <strong>email</strong> and <strong>g-recaptcha-response</strong>. </p>
  
  <p>I thought I could have a view model at the ApiController, like this:</p>
  
  <pre><code>public IHttpActionResult Post(FormModel model)
  {
     // automatic model binding to get the posted data.
  }
  
  public class FormModel
  {
      public string Name { get; set; }
      public string Email { get; set; }
      public string GRecaptchaResponse { get; set; }
  }
  </code></pre>
  
  <p>But obviously there is no rule to bind <code>g-recaptcha-response</code> to <code>GRecaptchaResponse</code>. And a valid property name should not contain a dash <code>-</code>.</p>
  
  <p>So the question is, how can we receive the <code>g-recaptcha-response</code> value at the server (ApiController) end?</p>