HttpRequestMessage.Version Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the HTTP message version.
public:
property Version ^ Version { Version ^ get(); void set(Version ^ value); };
public Version Version { get; set; }
member this.Version : Version with get, set
Public Property Version As Version
Property Value
The HTTP message version. The default value is 1.1
, unless you're targeting .NET Core 2.1 or 2.2. In that case, the default value is 2.0
.
Remarks
In .NET Core, the default message version differs based on the version you're using. .NET Core 2.1 changed the default value from 1.1
to 2.0
. In .NET Core 3.0, the default value was reverted back to 1.1
.
.NET Framework
The default message version is 1.1
.
.NET Core
The following table lists the default message version based on the version of .NET Core:
.NET Core version | HTTP request version |
---|---|
2.1 2.2 |
2.0 |
Any other .NET Core version | 1.1 |
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για