- Notifications
You must be signed in to change notification settings - Fork166
feat: add support for custom headers#1121
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
* Refactor client.download_blob_to_file* Chore: clean up code* refactor blob and client unit tests* lint reformat* Rename _prep_and_do_download
* Refactor client.download_blob_to_file* Chore: clean up code* refactor blob and client unit tests* lint reformat* Rename _prep_and_do_download* Refactor blob.upload_from_file* Lint reformat
…oogleapis#1082)* Refactor client.download_blob_to_file* Chore: clean up code* refactor blob and client unit tests* lint reformat* Rename _prep_and_do_download* Refactor blob.upload_from_file* Lint reformat* feature: add 'command' argument to private upload/download interface* lint reformat* reduce duplication and edit docstring
andrewsg left a comment
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.
Would be nice to have integration tests as well but since we don't typically snoop on outbound requests in our integration tests, and since custom headers don't usually have an impact on API behavior that is easily observable at the level our tests run, it may be difficult. Consider creative ways to implement an integration test if any come to mind; otherwise, good to go. Thanks.
Add support for custom headers on a per-client basis
Reference -https://cloud.google.com/storage/docs/troubleshooting#custom-headers
The following sample adds a custom header to the requests made by the client
Fixes internal b/294091512 🦕