Async. Support

Topics: Web Api
Jan 27, 2011 at 11:44 PM

Is it possible to create async entrypoints for the APIs?

I'm thinking about BeginGet/EndGet() APIs rather than Get(), as my service may involve several high-latency asynchronous operations.

Jan 28, 2011 at 3:23 AM

Are you asking if it is possible to make an asynchronous HTTP GET request using the HTTP client?  If so then take a look at HttpClient.GetAsync().


Jan 28, 2011 at 6:04 PM

Hi Darrel, no. I'm asking if it's possible to have the following APIs in my HelloWorld service, for instance:




Jan 28, 2011 at 6:17 PM

@ajthomas you can do that today in WCF as we support async operations. 

Jan 28, 2011 at 6:22 PM

Thanks Glenn. So in the example in, would I basically have a BeginPost() and an EndPost() ? I just wanted to ensure I could still leverage WCF asynchrony with the HTTP service.

Jan 28, 2011 at 6:30 PM

I haven't tested yet, but it should work. It's a bit of a PITA though in that the signatures have to be EXACTLY right. When I have some time I will see if I can get it to work, that is unless you get there first :-)

Jan 28, 2011 at 11:42 PM

Coolio. Thanks Glenn. I'll check it out when I can. Right now, I'm just using vanilla WCF.