diff --git a/Primary/Api.cs b/Primary/Api.cs index 8a804ed..a92caad 100644 --- a/Primary/Api.cs +++ b/Primary/Api.cs @@ -30,7 +30,14 @@ public class Api public Api(Uri baseUri, HttpClient httpClient = null) { BaseUri = baseUri; - HttpClient = httpClient ?? new HttpClient() { DefaultRequestVersion = new(2, 0) }; + HttpClient = httpClient ?? new HttpClient() + { +#if NET6 + DefaultRequestVersion = new(2, 0) +#else +#warning Not using HTTP/2. +#endif + }; } public Uri BaseUri { get; private set; } diff --git a/Primary/Primary.csproj b/Primary/Primary.csproj index b058568..7bd348c 100644 --- a/Primary/Primary.csproj +++ b/Primary/Primary.csproj @@ -1,7 +1,7 @@  - net6.0 + netstandard2.0;net6.0 latest 0.10.0-beta Primary.Net