Windows apps
Collapse the table of content
Expand the table of content
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.

IWebRequestCreate::Create Method (Uri^)

 

Creates a WebRequest instance.

Namespace:   System.Net
Assembly:  System (in System.dll)

WebRequest^ Create(
	Uri^ uri
)

Parameters

uri
Type: System::Uri^

The uniform resource identifier (URI) of the Web resource.

Return Value

Type: System.Net::WebRequest^

A WebRequest instance.

Exception Condition
NotSupportedException

The request scheme specified in uri is not supported by this IWebRequestCreate instance.

ArgumentNullException

uri is null.

UriFormatException
System_CAPS_noteNote

In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, FormatException, instead.

The URI specified in uri is not a valid URI.

The Create method must return an initialized instance of the WebRequest descendant that is capable of performing a standard request/response transaction for the protocol without needing any protocol-specific fields modified.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft