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
fix: reduce request usage #1607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than a nit. 🙂
@@ -15,7 +15,7 @@ | |||
'use strict'; | |||
|
|||
// [START functions_background_promise] | |||
const requestPromiseNative = require('request-promise-native'); | |||
const {request} = require('gaxios'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: does the leading G in gaxios
stand for Google here?
(If so, perhaps it should be moved to the GoogleCloudPlatform
org instead of a personal repo.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Google owned module :) It lives in the googleapis
org:
https://github.com/googleapis/gaxios/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - I was going off of the npm
entry. Maybe we should update that? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! googleapis/gaxios#239
Request is now deprecated. This moves the sample over to using
gaxios
, along with other cleanup.