title: The return type of an async method must be void, Task or Task<T>
body: <p>I have the following code here: </p>
  
  <pre><code>public async Dictionary&lt;string, float&gt; GetLikelihoodsAsync(List&lt;string&gt; inputs)
  {
      HttpClient client = new HttpClient(); 
  
      string uri = GetUri();
      string body = GetRequestBody(inputs);
      byte[] requestData = Encoding.UTF8.GetBytes(body);
  
      Dictionary&lt;string, float&gt; result = await GetResponseAsync(requestData, client, uri)
          .ContinueWith(responseTask =&gt; ParseResponseAsync(responseTask.Result))
          .ContinueWith(task =&gt; task.Result.Result);
  
      return result;
  }
  </code></pre>
  
  <p>with </p>
  
  <pre><code>async Task&lt;HttpResponseMessage&gt; GetResponseAsync(byte[] requestData, HttpClient client, string uri) {...}
  
  async Task&lt;Dictionary&lt;string, float&gt;&gt; ParseResponseAsync(HttpResponseMessage response) {...}
  </code></pre>
  
  <p>Basically after <strong>GetResponseAsync</strong> completes I want to take the results and feed it to <strong>ParseResponseAsync</strong> and get a task with the results of it.</p>
  
  <p>Currently, it gives an compiler error saying </p>
  
  <blockquote>
    <p>The return type of an async method must be void, Task or Task  </p>
  </blockquote>
  
  <p>What is the best way to achieve this goal and get rid of this error? Other (better solutions) are welcomed and some explanations of why do <strong>task.Result.Result</strong> in the last <em>ContinueWith</em> are also welcomed. </p>