title: why await does not wait untill httpclient postasync complets?
body: <p>Im creating http client for consume some api.</p>
  
  <p>Here is my client method calling to api endpoint.</p>
  
  <pre><code>public async Task&lt;HttpResponseMessage&gt; SendRequestAsync()
          {
  
              string adaptiveUri = "https://some-api/api/Authentication/AuthenticateThirdPartyUserAsync";
  
              using (HttpClient httpClient = new HttpClient())
              {
                  var json = JsonConvert.SerializeObject(new { userName = "uname", password = "123", applicantCode = "hello" });
                  var payload = new StringContent(json, Encoding.UTF8, "application/json");
  
                  HttpResponseMessage responseMessage = null;
                  try
                  {
                      responseMessage = await httpClient.PostAsync(adaptiveUri, payload);
                  }
                  catch (Exception ex)
                  {
                      if (responseMessage == null)
                      {
                          responseMessage = new HttpResponseMessage();
                      }
                      responseMessage.StatusCode = HttpStatusCode.InternalServerError;
                      responseMessage.ReasonPhrase = string.Format("RestHttpClient.SendRequest failed: {0}", ex);
                  }
                  return responseMessage;
              }
          }
  </code></pre>
  
  <p>calling method is as follows</p>
  
  <pre><code>public async Task&lt;IBaseStatus&gt; Handle(InspectionAddedEvent domainEvent)
  {
     var tk = await _iAClient.SendRequestAsync();
     return something;
  }
  </code></pre>
  
  <p>but <code>await</code> does not wait untill postasync completes.</p>
  
  <p>but when i use </p>
  
  <pre><code>httpClient.PostAsync(adaptiveUri, payload).GetAwaiter().GetResult()
  </code></pre>
  
  <p>it waits until post is complets.</p>
  
  <p>can anyone have idea about this?</p>
  
  <p>Thanks.</p>