HttpClient for Silverlight

Topics: Web Api
Nov 2, 2010 at 2:18 PM

It looks like the HttpClient is not currently available for Silverlight.  Will there be a Silverlight version coming soon?

I love the idea of the WebQuery, but I'm a Silverlight developer and would love to take advantage of it on that platform. 

Coordinator
Nov 2, 2010 at 8:36 PM

Thanks for the feedback. We are looking into ways to make HttpClient available for Silverlight and we are pursuing a more permissive license.

Jan 23, 2011 at 10:17 AM

 

Hi Glenn,

 

I am very interested to know the status of using the new API/Framework on silverlight for calling a REST Service.

 

Does it exist for silverlight? IS there a roadmap?

 

Thanks

Coordinator
Jan 23, 2011 at 7:10 PM

Hi John

Porting to Silverlight is not in our v1 plans. We will be watching the feedback closely however and if we see a lot of requests for Silverlight it is definitely something we will look into. We are looking into a more permissive license that will allow folks to take the code and use it on Silverlight / create a community SL version in the interim.

I'd suggest you create a workitem for making the client available in SL so others can vote.

Thanks!

Jan 24, 2011 at 1:30 AM

In the meantime, you can use the 'SimpleHttpClient' I created.  Not as powerful as the desktop version, but much more helpful than straight http.  Hopefully it will be included in the contrib project soon.  Links and sample code found here:

http://wcf.codeplex.com/Thread/View.aspx?ThreadId=242981

Coordinator
Jan 24, 2011 at 3:39 AM

Nice job Joe :-)

Jan 24, 2011 at 9:55 AM

Thanks for the comments! I am going to give it a try!

 

Jan 25, 2011 at 1:35 PM

I think more consideration and thought has to be given to Silverlight.  With the restrictions it currently has to just use TCP/IP and Soap, the REST interface is what is most likely to be leveraged.  WCF RIA Services uses a custom WCF config to handle binary HTTP, so I'm sure they should be looking at this as well.  If I'm wrong, please correct me!

Jan 27, 2011 at 12:34 PM

codputer,

Be careful what you wish for.  Silverlight is quite capable of making HTTP requests.  That is all that should be needed to take advantage of the full capabilities of the WCF Web APIS. Any additional magic like the WebQuery stuff should simply by syntactic sugar on top of a basic HTTP request.   

HttpClient should be an optional component to be able to take advantage of all of the WCF Web API goodness.

 

Jan 27, 2011 at 3:22 PM

DarrleMiller,

Appreciate the feedback. I’ve been digging into WCF and all its goodness, only to find that Silverlight has limitations on what it can use from the WS* stack.

To be honest, all these layers of protocols really drives me crazy. Lowry hates HTTP, and has mostly ignored it from his teachings of WCF. Yet the world of distributed applications seems to be going to the REST implementation almost exclusively. As Glenn Block has stated, WCF has not made HTTP a first class citizen and that he is out to change that.

I’m hoping that if I continue to be involved in this conversation, it will eventually rub in from the outside.

R

From: DarrelMiller [email removed]
Sent: January-27-11 6:35 AM
To: rreukema@hotmail.com
Subject: Re: HttpClient for Silverlight [wcf:233169]

From: DarrelMiller

codputer,

Be careful what you wish for. Silverlight is quite capable of making HTTP requests. That is all that should be needed to take advantage of the full capabilities of the WCF Web APIS. Any additional magic like the WebQuery stuff should simply by syntactic sugar on top of a basic HTTP request.

HttpClient should be an optional component to be able to take advantage of all of the WCF Web API goodness.