Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
1 out of 1 rated this helpful - Rate this topic

WebRequestCreator.ClientHttp Property

April 12, 2014

Gets an object that specifies client HTTP handling for Web requests and responses.

Namespace:  System.Net.Browser
Assembly:  System.Windows (in System.Windows.dll)
public static IWebRequestCreate ClientHttp { get; }

Property Value

Type: System.Net.IWebRequestCreate
An IWebRequestCreate object for use with Windows Phone-based application.

Since the Windows Phone client provides HTTP handling by default, you typically never need to use this property.

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);
}


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.