-
Notifications
You must be signed in to change notification settings - Fork 591
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
Reintroduce x-goog-api-client for common-grpc #2164
Conversation
This introduces this header for non-gapic APIs. Revise of googleapis#2020.
packages/common-grpc/src/service.js
Outdated
@@ -178,6 +179,11 @@ function GrpcService(config, options) { | |||
|
|||
this.grpcMetadata = new grpc.Metadata(); | |||
|
|||
this.grpcMetadata.add('x-goog-api-client', [ | |||
'gl-node/' + process.versions.node, | |||
'gccl/' + (config.packageJson.version || ''), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/common-grpc/src/service.js
Outdated
'gl-node/' + process.versions.node, | ||
'gccl/' + (config.packageJson.version || ''), | ||
'grpc/' + grpcVersion | ||
].join(' ')); | ||
if (config.grpcMetadata) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/common-grpc/test/service.js
Outdated
'x-goog-api-client': [ | ||
'gl-node/' + process.versions.node, | ||
'gccl/' + CONFIG.packageJson.version, | ||
'grpc/' + grpcVersion].join(' ') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/common-grpc/src/service.js
Outdated
this.grpcMetadata.add('x-goog-api-client', [ | ||
'gl-node/' + process.versions.node, | ||
'gccl/' + (config.packageJson.version || ''), | ||
'grpc/' + grpcVersion |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/common-grpc/test/service.js
Outdated
@@ -21,6 +21,7 @@ var duplexify = require('duplexify'); | |||
var extend = require('extend'); | |||
var googleProtoFiles = require('google-proto-files'); | |||
var grpc = require('grpc'); | |||
var grpcVersion = require('grpc/package.json').version; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This introduces this header for non-gapic APIs.
Revise of #2020.