-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow customizing the http client #426
Conversation
e930fa3
to
f025ee6
Compare
@forty this seems like a fairly reasonable addition to the library to me. |
Thanks @forty! This looks great - would you mind adding a small test in |
@forty this looks ready to go, to me, with the addition of a test as @danielbankhead requests. |
Great, thanks for the reviews, I'll try to look into adding the test sometimes next week 👍 |
@danielbankhead @bcoe I added a small test that makes sure the custom transporter is used (if any), let me know if it's not enough |
Great! Thanks for your contribution |
🤖 I have created a release *beep* *boop* --- ## [6.1.0](v6.0.1...v6.1.0) (2022-06-28) ### Features * allow customizing the http client ([#426](#426)) ([408ad04](408ad04)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Hi!
Sorry, I did not really follow the process before opening this MR 😬 but it was quick and I promise I won't complain if you just throw it away :)
So the idea is just to create a similar concept of "transporter" like
https://github.com/googleapis/google-auth-library-nodejs/
has, which can be used to customize gaxios (or could even allow to plug a different library I guess, with some effort though).google-auth-library use the tranporter everywhere, but when using gtoken https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/jwtclient.ts#L188 which is annoying, because I would like my custom transporter to be used everywhere (I set a custom node http agent).
What do you think ?