开发者

SILVERLIGHT: How to access a restful service from silverlight

开发者 https://www.devze.com 2023-01-21 22:13 出处:网络
What is the standard way of accessing a restful service from silver开发者_C百科light (I am targetting v3 of silverlight)?

What is the standard way of accessing a restful service from silver开发者_C百科light (I am targetting v3 of silverlight)?

In .net i use REST Starter KIT but its not compatible with Silverlight - although i did find a port but unsure weather to try it.

Is there a standard way to access rest from silverlight?

Any good examples or tutorials?

Also is there an equivelant of ReadAsDataContract for populating a .net class from the restful service?

Any help really appreciated

Thanks


here is a pretty basic tutorial on that: http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-3-using-networking-to-retrieve-data-and-populate-a-datagrid.aspx


Use ClientHttpStack and System.Runtime.Serialization

Take a look at the Client HTTP Stack for Silverlight, you'll need this to implement REST properly.

You can turn your ResponseStream into an object using System.Runtime.Serialization's DataContractSerializer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号