WebRequestCreator.ClientHttp Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets an object that specifies client HTTP handling for Web requests and responses.
Assembly: System.Windows (in System.Windows.dll)
Property Value
Type: System.Net.IWebRequestCreateAn IWebRequestCreate object for use with Windows Phone-based application.
The following example shows you how to specify client HTTP handling for all messages.
bool httpResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp); bool httpsResult = WebRequest.RegisterPrefix("https://", WebRequestCreator.ClientHttp); ... if (httpResult == true) { WebClient wc = new WebClient(); wc.OpenReadAsync(new Uri("http://api.search.live.net/qson.aspx?query=Windows")); wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted); }
Show: