Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
cojenco merged 14 commits intogoogleapis:mainfromcojenco:custom-headers1
Oct 19, 2023

Conversation

@cojenco
Copy link
Contributor

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

from google.cloud import storageclient = storage.Client(    extra_headers={        "custom-header": "custom-value"    })

Fixes internal b/294091512 🦕

MiaCYand others added8 commitsJune 13, 2023 16:27
* 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
@cojencocojenco requested review froma team ascode ownersSeptember 19, 2023 20:26
@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. api: storageIssues related to the googleapis/python-storage API. labelsSep 19, 2023
@cojencocojenco added the owlbot:runAdd this label to trigger the Owlbot post processor. labelSep 19, 2023
@gcf-owl-botgcf-owl-botbot removed the owlbot:runAdd this label to trigger the Owlbot post processor. labelSep 19, 2023
@cojencocojenco added the owlbot:runAdd this label to trigger the Owlbot post processor. labelSep 20, 2023
@gcf-owl-botgcf-owl-botbot removed the owlbot:runAdd this label to trigger the Owlbot post processor. labelSep 20, 2023
Copy link
Contributor

@andrewsgandrewsg left a 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.

cojenco reacted with thumbs up emoji
@cojencocojenco added the owlbot:runAdd this label to trigger the Owlbot post processor. labelOct 18, 2023
@gcf-owl-botgcf-owl-botbot removed the owlbot:runAdd this label to trigger the Owlbot post processor. labelOct 18, 2023
@cojencocojenco merged commit2f92c3a intogoogleapis:mainOct 19, 2023
@cojencocojenco deleted the custom-headers1 branchNovember 16, 2023 22:06
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@andrewsgandrewsgandrewsg approved these changes

Assignees

No one assigned

Labels

api: storageIssues related to the googleapis/python-storage API.size: mPull request size is medium.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@cojenco@andrewsg@MiaCY

[8]ページ先頭

©2009-2025 Movatter.jp