IWebRequestCreate.Create Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Creates a WebRequest instance.
Assembly: System.Net (in System.Net.dll)
Parameters
- uri
- Type: System.Uri
The uniform resource identifier (URI) of the Web resource.
| Exception | Condition |
|---|---|
| NotSupportedException | The request scheme specified in uri is not supported by this IWebRequestCreate instance. |
| ArgumentNullException | uri is null. |
| SecurityException | The caller does not have permission to connect to the requested URI or a URI that the request is redirected to. |
| UriFormatException | 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.