Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: REST fallback client header (#513)
Browse files Browse the repository at this point in the history
[PR](googleapis/gapic-generator-typescript#878) within
updated gapic-generator-typescript version 1.4.0

Committer: @summer-ji-eng
PiperOrigin-RevId: 375759421

Source-Link: googleapis/googleapis@95fa72f

Source-Link: googleapis/googleapis-gen@f40a343
  • Loading branch information
gcf-owl-bot[bot] committed Jun 17, 2021
1 parent be1e05b commit 833d2d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/v1/auto_ml_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export class AutoMlClient {
}
if (!opts.fallback) {
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
} else if (opts.fallback === 'rest') {
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
}
if (opts.libName && opts.libVersion) {
clientHeader.push(`${opts.libName}/${opts.libVersion}`);
Expand Down
2 changes: 2 additions & 0 deletions src/v1/prediction_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export class PredictionServiceClient {
}
if (!opts.fallback) {
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
} else if (opts.fallback === 'rest') {
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
}
if (opts.libName && opts.libVersion) {
clientHeader.push(`${opts.libName}/${opts.libVersion}`);
Expand Down
2 changes: 2 additions & 0 deletions src/v1beta1/auto_ml_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export class AutoMlClient {
}
if (!opts.fallback) {
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
} else if (opts.fallback === 'rest') {
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
}
if (opts.libName && opts.libVersion) {
clientHeader.push(`${opts.libName}/${opts.libVersion}`);
Expand Down
2 changes: 2 additions & 0 deletions src/v1beta1/prediction_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export class PredictionServiceClient {
}
if (!opts.fallback) {
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
} else if (opts.fallback === 'rest') {
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
}
if (opts.libName && opts.libVersion) {
clientHeader.push(`${opts.libName}/${opts.libVersion}`);
Expand Down

0 comments on commit 833d2d7

Please sign in to comment.