Reputation: 5665
I have some C# code in a Windows Phone app...
WebRequest wrq = WebRequest.CreateHttp("http://bing.com");
is it possible to make this use HTTPS instead? There's no CreateHttps, and no obvious flags for me to fiddle with.
Chris
Upvotes: 1
Views: 595
Reputation: 3101
Note you should not use CreateHttp in your app code! http://msdn.microsoft.com/en-us/library/ff382776%28v=vs.95%29.aspx
Upvotes: 1
Reputation: 15063
Have you tried following?
WebRequest wrq = WebRequest.Create("https://bing.com");
Notice that the url uses HTTPS scheme. I believe this should just work fine. Did you run into some issue with this method?
Upvotes: 2