title: API PUT request fails to update things
body: <p>I am following this tutorial.</p>
  
  <p><a href="https://www.tutorialsteacher.com/webapi/consume-web-api-put-method-in-aspnet-mvc" rel="nofollow noreferrer">https://www.tutorialsteacher.com/webapi/consume-web-api-put-method-in-aspnet-mvc</a></p>
  
  <p>This is what I have:</p>
  
  <pre><code>public ActionResult Edit(int id)
      {
          Employees employee = null;
  
          using (var client = new HttpClient())
          {
              client.BaseAddress = new Uri("https://localhost:44339/api/employees");
              //HTTP GET
              var responseTask = client.GetAsync("employees/" + id.ToString());
              responseTask.Wait();
  
  
  
              var result = responseTask.Result;
              if (result.IsSuccessStatusCode)
              {
                  var readTask = result.Content.ReadAsAsync&lt;Employees&gt;();
                  readTask.Wait();
  
                  employee = readTask.Result;
              }
          }
  
          return View(employee);
      }
  
      [HttpPost]
      public ActionResult Edit(Employees employee)
      {
          using (var client = new HttpClient())
          {
              client.BaseAddress = new Uri("https://localhost:44339/api/employees");
  
              //HTTP POST
              var putTask = client.PutAsJsonAsync&lt;Employees&gt;("employees", employee);
              putTask.Wait();
  
              var result = putTask.Result;
              if (result.IsSuccessStatusCode)
              {
  
                  return RedirectToAction("ApiTest");
              }
          }
          return View(employee);
      }
  </code></pre>
  
  <p>It just returns me back to ApiTest with no update happening. I have been trying to figure this out but it is killing me. </p>