Skip to content

Conversation

zhouselena
Copy link
Contributor

GODRIVER-3373

Summary

NewHTTPClient returns a globally defined DefaultHTTPClient that returns DefaultTransport or updates the transport if it is replaced with a non-default transport.

Background & Motivation

Users can now use non-default transports without panic.

@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the review-priority-low Low Priority PR for Review: within 3 business days label Jun 21, 2025
@mongodb-drivers-pr-bot
Copy link
Contributor

API Change Report

No changes found!

@zhouselena zhouselena marked this pull request as ready for review June 23, 2025 15:47

func (*nonDefaultTransport) RoundTrip(*http.Request) (*http.Response, error) { return nil, nil }

func TestClientHTTPTransport(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Could we add a subtest for the default case?

Copy link
Member

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@zhouselena zhouselena merged commit eac85d7 into mongodb:release/2.2 Jul 2, 2025
29 of 33 checks passed
prestonvasquez pushed a commit to prestonvasquez/mongo-go-driver that referenced this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-priority-low Low Priority PR for Review: within 3 business days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants