This repository was archived by the owner on Dec 16, 2025. It is now read-only.
feat: allow customizing the http client#426
Merged
danielbankhead merged 1 commit intogoogleapis:mainfrom Jun 28, 2022
Merged
Conversation
e930fa3 to
f025ee6
Compare
|
@forty this seems like a fairly reasonable addition to the library to me. |
Contributor
|
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. |
Contributor
Author
|
Great, thanks for the reviews, I'll try to look into adding the test sometimes next week 👍 |
Contributor
Author
|
@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 |
Contributor
|
Great! Thanks for your contribution |
danielbankhead
approved these changes
Jun 28, 2022
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Jun 30, 2022
🤖 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ?