title: Posting a complex object with ASP.NET WebAPI
body: <p>How can I use <code>WebClient</code> object to send a POST request like this:</p>
  
  <pre><code>public static void SaveOrUpdateEntity(string url, object data)
  {
      using (var client = new WebClient())
      {
          // TODO
      }
  }
  </code></pre>
  
  <p>where its <code>data</code> is a <code>Person</code> object. </p>
  
  <p>This is controller method</p>
  
  <pre><code>[HttpPost]
  public void Post([FromBody]Person person)
  {
      VeranaWebService.SaveOrUpdatePerson(person);
  }
  </code></pre>
  
  <p>and <code>Person</code> class</p>
  
  <pre><code>public class Person
  {
      public string Name { get; set; }
      public string FirstName { get; set; }
      public DateTime? BirthDate { get; set; }
      public byte[] Photo { get; set; }
  }
  </code></pre>