From d1c34c04be37a354a0965aa464a847dde0494ca3 Mon Sep 17 00:00:00 2001 From: Clement Gutel Date: Wed, 4 Nov 2026 00:01:04 +1100 Subject: [PATCH 1/2] Prefer HTTP/2 for OAuth token requests --- ShopifyNet/OAuth/ShopifyOAuthClient.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ShopifyNet/OAuth/ShopifyOAuthClient.cs b/ShopifyNet/OAuth/ShopifyOAuthClient.cs index 82940e8..cee18c8 100644 --- a/ShopifyNet/OAuth/ShopifyOAuthClient.cs +++ b/ShopifyNet/OAuth/ShopifyOAuthClient.cs @@ -401,6 +401,8 @@ private async Task RequestAccessTokenAsync(string myShopifyDomain, Diction using var request = new HttpRequestMessage(HttpMethod.Post, $"https://{myShopifyDomain}/admin/oauth/access_token") { + Version = HttpVersion.Version20, + VersionPolicy = HttpVersionPolicy.RequestVersionOrLower, Content = new FormUrlEncodedContent(parameters) }; request.Headers.Accept.ParseAdd("application/json"); From b8e47b44f1ad8f97bb5bfd41a55506b4d532e109 Mon Sep 17 00:00:00 2001 From: Clement Gutel Date: Wed, 4 Nov 2026 00:03:33 +1100 Subject: [PATCH 2/2] Honor HttpClient default HTTP version and policy --- ShopifyNet/OAuth/ShopifyOAuthClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShopifyNet/OAuth/ShopifyOAuthClient.cs b/ShopifyNet/OAuth/ShopifyOAuthClient.cs index cee18c8..4bacba6 100644 --- a/ShopifyNet/OAuth/ShopifyOAuthClient.cs +++ b/ShopifyNet/OAuth/ShopifyOAuthClient.cs @@ -401,8 +401,8 @@ private async Task RequestAccessTokenAsync(string myShopifyDomain, Diction using var request = new HttpRequestMessage(HttpMethod.Post, $"https://{myShopifyDomain}/admin/oauth/access_token") { - Version = HttpVersion.Version20, - VersionPolicy = HttpVersionPolicy.RequestVersionOrLower, + Version = _httpClient.DefaultRequestVersion, + VersionPolicy = _httpClient.DefaultVersionPolicy, Content = new FormUrlEncodedContent(parameters) }; request.Headers.Accept.ParseAdd("application/json");