Skip to content

Conversation

@xavivars
Copy link
Contributor

@xavivars xavivars commented Apr 23, 2025

This is a very early PR, to discuss the approach.

An alternative would be to allow for injecting an HTTP client. However, I prefer being able to do this because I do appreciate all the defaults net.Client and its Transport already have.

If you think functionality like this would be useful contributed upstream, these are the parts that are missing

  • replicate the change in all places where a NewClient is being created
  • add tests

@xavivars xavivars changed the title Add custom roundTripper to net.Client Draft: Add custom roundTripper to net.Client Apr 23, 2025
@szuecs
Copy link
Member

szuecs commented Apr 25, 2025

@szuecs
Copy link
Member

szuecs commented Oct 22, 2025

@xavivars sorry I didn't respond here, yet but I think it's fine to do it as you suggested.
I hope that it was clear enough from my side back then in chat. :)

@xavivars
Copy link
Contributor Author

It was clear, it's just that I dropped this branch somewhere and will need to get back to it. :)

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