title: Call HttpPut with parameter C#
body: <p>So I create an <code>HttpPut</code> method in an <code>ASP.NET web api</code>. </p>
  
  <pre><code>[Route("api/Account/Save")]
  [HttpPut]
  public IHttpActionResult SaveAccount(Account acc) {
     // do stuff
  }
  </code></pre>
  
  <p>I pass in an instant of the <code>Account</code> class.</p>
  
  <pre><code>class Account
  {
      public int AccountID { get; set; }
      public string AccountName { get; set; }
  }
  </code></pre>
  
  <p>Now I want to call this from a console application. I am trying to do this but it's not working. It's not throwing any exception either.</p>
  
  <pre><code>var acc = new Account() { AccountID = 1234, AccountName = "zzzzP" };
  string json = JsonConvert.SerializeObject(acc);
  HttpContent content = new StringContent(json);
  response = await client.PutAsync("api/Account/Save", content);
  </code></pre>
  
  <p>Json returned:</p>
  
  <pre><code>"{\"AccountID\":1234,\"AccountName\":\"zzzzP\"}"
  </code></pre>