Skip to content

🚀 Force HTTP2 in API calls#22

Merged
HanXHX merged 1 commit intomasterfrom
force_http2
Mar 13, 2026
Merged

🚀 Force HTTP2 in API calls#22
HanXHX merged 1 commit intomasterfrom
force_http2

Conversation

@HanXHX
Copy link
Contributor

@HanXHX HanXHX commented Mar 13, 2026

When TLSClientConfig is provided, HTTP2 is not enabled by default.

When TLSClientConfig is provided, HTTP2 is not enabled by default.
Copilot AI review requested due to automatic review settings March 13, 2026 07:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures HTTP/2 is attempted for outbound API/HTTP calls even when a custom TLSClientConfig is provided (which otherwise disables automatic HTTP/2 enablement in Go’s http.Transport unless explicitly allowed).

Changes:

  • Enable HTTP/2 negotiation by setting ForceAttemptHTTP2: true on the API client transport.
  • Enable HTTP/2 negotiation by setting ForceAttemptHTTP2: true on the CLI auth HTTP transport.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/api/client.go Forces HTTP/2 attempt for authenticated API requests that use a custom TLS config.
cmd/auth.go Forces HTTP/2 attempt for CLI auth-related HTTP calls using a custom TLS config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@HanXHX HanXHX merged commit bf23e8e into master Mar 13, 2026
8 checks passed
@HanXHX HanXHX deleted the force_http2 branch March 13, 2026 10:50
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