Skip to content

Commit

Permalink
fix: set x-goog-request-params for streaming pull request (#1849)
Browse files Browse the repository at this point in the history
* samples: create BigQuery subscription

* 馃 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: set x-goog-request-params for streaming pull request

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Megan Potter <57276408+feywind@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 3, 2023
1 parent 58d8a92 commit 7b82ff0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/message-stream.ts
Expand Up @@ -323,8 +323,13 @@ export class MessageStream extends PassThrough {
? 0
: this._subscriber.maxBytes,
};
const otherArgs = {
headers: {
'x-goog-request-params': 'subscription=' + this._subscriber.name,
},
};

const stream: PullStream = client.streamingPull({deadline});
const stream: PullStream = client.streamingPull({deadline, otherArgs});
this._replaceStream(index, stream);
stream.write(request);
}
Expand Down

0 comments on commit 7b82ff0

Please sign in to comment.