IWebRequestCreate.Create(Uri) 方法
定义
创建一个 WebRequest 实例。Creates a WebRequest instance.
public:
System::Net::WebRequest ^ Create(Uri ^ uri);
public System.Net.WebRequest Create (Uri uri);
abstract member Create : Uri -> System.Net.WebRequest
Public Function Create (uri As Uri) As WebRequest
参数
- uri
- Uri
Web 资源的统一资源标识符 (URI)。The uniform resource identifier (URI) of the Web resource.
返回
一个 WebRequest 实例。A WebRequest instance.
例外
此 IWebRequestCreate 实例不支持 uri 中指定的请求方案。The request scheme specified in uri is not supported by this IWebRequestCreate instance.
uri 为 null。uri is null.
注解
Create方法必须返回子代的已初始化实例 WebRequest ,该子代能够为协议执行标准请求/响应事务,无需修改任何特定于协议的字段。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.