ProtocolVersion Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the version of HTTP to use for the request.

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

public Version ProtocolVersion { get; set; }

Property Value

Type: System..::..Version
The HTTP version to use for the request. The default is HttpVersion..::..Version11.

ExceptionCondition
ArgumentException

The HTTP version is set to a value other than 1.0 or 1.1.

The HttpWebRequest class supports only versions 1.0 and 1.1 of HTTP. Setting ProtocolVersion to a different version throws an exception.

Show: