1

I would like to access to an external webservice from a Silverlight client.

I know how to do the GET method. But I can't find a way to use DELETE, PUT and POST in Silverlight.

I have tried HttpWebRequest but in Silverligth I don't have access to the full stack of method from this class.

Does anyone have an idea on how to do that ?

Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142
Maxime Mangel
  • 1,906
  • 16
  • 18
  • take a look at thi link it may be 1 a good starting pointhttp://www.silverlightshow.net/items/Using-RESTful-services-from-Silverlight.aspx – BRAHIM Kamel Jun 24 '14 at 22:03
  • 1
    Hum, the link is dead for me. – Maxime Mangel Jun 24 '14 at 22:08
  • similar question: http://stackoverflow.com/questions/9616856/silverlight-http-delete-and-put-methods-with-restsharp – m.eslahi.k Jun 25 '14 at 04:42
  • My clientpolicy is already like that my problem isn't with the cross domain problem. The problem that I can't have access to the whole code of the HttpWebRequest as I am un silverlight and not in WPF or other thing like that. – Maxime Mangel Jun 25 '14 at 05:33

1 Answers1

1

Microsoft has released a portable version of HttpClient that can be used in Silverlight that will give you the REST methods you are looking for. See this link for how to add it to your project via nuget: https://www.nuget.org/packages/Microsoft.Net.Http.

Rob J
  • 6,609
  • 5
  • 28
  • 29