Co-Routines with HttpClient asynchronous calls

Topics: Actions & Coroutines
May 26, 2013 at 5:19 AM
can someone help me better understand how to "pause" a coroutine to stop an implementation of IResult from yielding to another IResult until the async call to a web service is completed?

I'm using HttpClient in this instance. Is there a better tool to use in order to make the request where it would be in a synchronous model instead, which would give me what I want?
May 26, 2013 at 6:43 AM
Just fire the Completed event when the HTTP request is finished.

If you can use the async methods of HttpClient it is even easier:
var result = httpClient.GetAsync("").AsResult();
yield return result;
//TODO: process the result
May 27, 2013 at 1:49 AM
Yea... Had built too many tasks.

Sent from my iPhone