Martin Macak
Martin Macak

Reputation: 3831

Windows Phone 8 and REST

I need to use REST web services under Windows Phone 8, but there is no System.ServiceModel.Web namespace in WP framework so I cannot use WebGet and WebInvoke annotations.

How am I supposed to do HTTP GET calls using WCF? Is WCF supported in Windows Phone 8?

EDIT

The only approach that I can think off now is to use direct approach using HttpWebRequest and handle everything by hand. I wanted to avoid this since this approach brings too much boilerplate code inside the production code. This is why WCF is here. I can't even use RealProxy to implement some basic facilities myself since it's not supported either. The only solution that brings some automation and removes boilerplate code is to use dynamic and DLR features with DynamicObject, that will resolve the calls in runtime, but this will strip me of from static compiler checking.

Why did Microsoft remove crucial parts of framework from WP8? I don't get it.

Upvotes: 3

Views: 2546

Answers (1)

Claus Jørgensen
Claus Jørgensen

Reputation: 26344

Why did Microsoft remove crucial parts of framework from WP8?

They were never present. Such APIs would be considered features. And with frameworks like RestSharp there's little need to trouble yourself with writing anything by hand.

Upvotes: 4

Related Questions