Are there any examples on how to stream a response....
What I'd like is to call a service, which extract a lot of data from a DB. If I do it the normal way, I'll have to wait for the extract of all the data to be done, before returning anything to the client... what I'd like is to just write the data to a stream,
which the client can read right away.... how do I do that?
I would have expected something like this
public Task<HttpResponseMessage<Stream>> Extract()
return Task.Factory.StartNew<HttpResponseMessage<Stream>>((HttpResponseMessage<Stream> m) =>
var sw = new StreamWriter(m.Content);
but I really can't figure out how to do it....