Skip to content

Commit 25aeca8

Browse files
authored
feat(userAgent): allow for optional user agent to be provided (#671)
* feat(userAgent): allow for optional user agent to be provided * chore: linted * updates @google-cloud/common version
1 parent 30064a7 commit 25aeca8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"precompile": "gts clean"
4949
},
5050
"dependencies": {
51-
"@google-cloud/common": "^3.0.0",
51+
"@google-cloud/common": "^3.1.0",
5252
"@google-cloud/paginator": "^3.0.0",
5353
"@google-cloud/promisify": "^2.0.0",
5454
"arrify": "^2.0.1",

src/bigquery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export interface BigQueryOptions extends common.GoogleAuthOptions {
163163
autoRetry?: boolean;
164164
maxRetries?: number;
165165
location?: string;
166+
userAgent?: string;
166167
/**
167168
* The API endpoint of the service used to make requests.
168169
* Defaults to `bigquery.googleapis.com`.
@@ -199,6 +200,8 @@ export interface BigQueryOptions extends common.GoogleAuthOptions {
199200
* native Promises.
200201
* @property {string} [location] The geographic location of all datasets and
201202
* jobs referenced and created through the client.
203+
* @property {string} [userAgent] The value to be prepended to the User-Agent
204+
* header in API requests.
202205
* @property {string[]} [scopes] Additional OAuth scopes to use in requests. For
203206
* example, to access an external data source, you may need the
204207
* `https://www.googleapis.com/auth/drive.readonly` scope.

0 commit comments

Comments
 (0)