Mono Class Library: System.Net.HttpWebRequest Overview | Members

System.Net.HttpWebRequest.ProtocolVersion Property

Gets or sets the version of the HTTP protocol to use for the current request. [Edit]

public Version ProtocolVersion { set; get; }

Value

A Version that represents the HTTP version to use for the request. The default is HttpVersion.Version11. [Edit]

Exceptions

TypeReason
ArgumentExceptionThe HTTP version is set to a value other than 1.0 or 1.1. [Edit]

Remarks

The System.Net.HttpWebRequest class supports only versions 1.0 and 1.1 of HTTP. Setting HttpWebRequest.ProtocolVersion to a different version causes a ArgumentException exception to be thrown.

Note: To set the HttpWebRequest.ProtocolVersion property of the current instance, specify one of the members of the use the System.Net.HttpVersion class.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0