title: How to send output to browser before C# azure function finishes?
body: <p>I want to develop an azure function that performs some tasks that take some seconds and it will be triggered manually from a browser. Is there a possibility to already provide some output to the browser before everything is finished?</p>
  <p>For example something like:</p>
  <pre><code>using System.IO;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Mvc;
  using Microsoft.Azure.WebJobs;
  using Microsoft.Azure.WebJobs.Extensions.Http;
  using Microsoft.Extensions.Logging;
  using Newtonsoft.Json;
  
  namespace Company.Function
  {
      public static class HttpTriggerCSharp1
      {
          [FunctionName(&quot;HttpTriggerCSharp1&quot;)]
          public static async Task&lt;IActionResult&gt; Run(
              [HttpTrigger(AuthorizationLevel.Function, &quot;get&quot;, &quot;post&quot;, Route = null)] HttpRequest req,
              ILogger log)
          {
              SendPartialResponse(&quot;starting task 1&quot;); // &lt;- how to implement this?
  
              DoSomethingThatTakesSomeTime();
  
              SendPartialResponse(&quot;starting task 2&quot;); // &lt;- how to implement this?
           
              DoSomethingElseThatTakesSomeTime();
  
              return new OkObjectResult(&quot;finished&quot;); // &lt;- no problem if return code has to be sent earlier
          }
      }
  }
  </code></pre>