title: What does an async Web API method return?
body: <p>What is actually returned by a Web API method with the following signature?</p>
  
  <pre><code>    [HttpPost]
      public async Task&lt;IHttpActionResult&gt; Post([FromBody] ReviewViewModel review)
      {
          using (var context = new BooksContext())
          {
              var book = await context.Books.FirstOrDefaultAsync(b =&gt; b.Id == review.BookId);
              if (book == null)
              {
                  return NotFound();
              }
  
              var newReview = context.Reviews.Add(new Review
              {
                  BookId = book.Id,
                  Description = review.Description,
                  Rating = review.Rating
              });
  
              await context.SaveChangesAsync();
              return Ok(new ReviewViewModel(newReview));
          }
      }
  </code></pre>
  
  <p>Method taken from: <a href="http://www.developerhandbook.com/c-sharp/create-restful-api-authentication-using-web-api-jwt/" rel="nofollow noreferrer">http://www.developerhandbook.com/c-sharp/create-restful-api-authentication-using-web-api-jwt/</a></p>
  
  <p>I'm considering that it is either:</p>
  
  <p>1) The framework does not return a response to the calling client until .IsCompleted is true, or
  2) The framework does return to the client but the client must handle the situation gracefully, or
  3) Something else entirely.</p>