System::Net::WebRequest::CreateHttp method

WebRequest::CreateHttp(String) method

Creates a new instance of the WebRequest class using the specified URI.

static System::SharedPtr<HttpWebRequest> System::Net::WebRequest::CreateHttp(String requestUriString)
ParameterTypeDescription
requestUriStringStringThe URI that is used to create a new instance of the WebRequest class.

ReturnValue

A newly created WebRequest-class instance.

Remarks

NotSupportedException will be thrown when the specified URI begins with any scheme except for http:// or https://.

See Also

WebRequest::CreateHttp(System::SharedPtr<Uri>) method

Creates a new instance of the WebRequest class using the specified URI.

static System::SharedPtr<HttpWebRequest> System::Net::WebRequest::CreateHttp(System::SharedPtr<Uri> requestUri)
ParameterTypeDescription
requestUriSystem::SharedPtr<Uri>The URI that is used to create a new instance of the WebRequest class.

ReturnValue

A newly created WebRequest-class instance.

Remarks

NotSupportedException will be thrown when the specified URI begins with any scheme except for http:// or https://.

See Also