Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not initialize http.Client during each request to a remote location #2151

Merged

Conversation

pbusko
Copy link
Contributor

@pbusko pbusko commented May 10, 2024

Summary

Instead of initialising the http.Client during every call to the downloader.Download, use the http.DefaultClient. Also custom client can be provided with the blob.WithClient option (for example with a custom RoundTripper for injecting credentials)

Output

Before

After

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

Resolves #___

@pbusko pbusko requested review from a team as code owners May 10, 2024 12:11
@github-actions github-actions bot added this to the 0.34.0 milestone May 10, 2024
@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label May 10, 2024
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
Copy link
Member

@jjbustamante jjbustamante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @pbusko

@jjbustamante jjbustamante merged commit 1cc921d into buildpacks:main May 16, 2024
16 checks passed
@pbusko pbusko deleted the blob-downloader-client branch May 16, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants