Return progress from Web API

How can I return multiple values from Http method dynamically as progress ?

I have tried method :

public async IAsyncEnumerable<IActionResult> GenerateImage(){
CancellationToken cancellationToken = _httpContextAccessor.HttpContext.RequestAborted;

await Task.Factory.StartNew(() =>
  {
      for(int i =0; i< 10; i++)
      {
         Ok(new {id = i });
         Thread.Sleep(1000);
         if (cancellationToken.IsCancellationRequested)
         {
              Ok("Cancel requested");
              break;
         }
       }   
     }, cancellationToken);
            yield return Ok();
}

Question : Can I somehow make Http method return 'i' one by one to track progress ?

Cancelation token works (Angular side) - when on cancel button click => this.subscription.unsubscribe();

Additional Information : I am using Angular 11 project for front-end and Web API built on .NET 5

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum