Skip to content

Default OAuth to HTTP/2 while honoring custom HttpClient settings - #21

Merged
matnun-br merged 3 commits into
mainfrom
fix/oauth-http2-defaults
Nov 4, 2026
Merged

matnun-br merged 3 commits into
mainfrom
fix/oauth-http2-defaults

Conversation

@clement911

Copy link
Copy Markdown
Contributor

OAuth token requests currently default to HTTP/1.1 and ignore the supplied HttpClient's version settings.

Configure the built-in HttpClient with DefaultRequestVersion = HttpVersion.Version20 and DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrLower. Copy the selected client's default version and policy onto each HttpRequestMessage, so built-in requests prefer HTTP/2 with fallback while callers supplying their own HttpClient control both settings.

Validation: inspected the final diff. Local build and tests could not run because the .NET SDK is unavailable; the existing PR workflow runs build and tests.

@clement911

Copy link
Copy Markdown
Contributor Author

@matnun-br

@matnun-br
matnun-br merged commit bdfb605 into main Nov 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants