SocketTools .NET Edition

HttpClient.ProtocolVersion Property

Gets and sets a value which specifies the default protocol version.

[Visual Basic]
Public Property ProtocolVersion As HttpVersion
[C#]
public HttpClient.HttpVersion ProtocolVersion {get; set;}

Property Value

An HttpVersion enumeration which specifies the protocol version.

Remarks

The ProtocolVersion property sets or returns the current HTTP version number. It is used to determine how requests are submitted to the server, as well as what header fields are required. The default value for this property is HttpVersion.version10, and should be changed before any connection attempt is made by the client.

Note that setting the property value to HttpVersion.version09 tells the client to use the preliminary protocol specification which only supported a basic version of the GET command, and did not have any provisions for features such as user authentication, virtual hosting, etc. Header fields are not supported in this version of the protocol.

See Also

HttpClient Class | SocketTools Namespace