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

feat(ext/fetch): Make fetch client parameters configurable #26909

Merged

Conversation

magurotuna
Copy link
Member

@magurotuna magurotuna commented Nov 18, 2024

This commit makes HTTP client parameters used in fetch API configurable on the extension initialization via a callback client_builder_hook that users can provide.

The main motivation behind this change is to allow deno_fetch users to tune the HTTP/2 client to suit their needs, although Deno CLI users will not benefit from it as no JavaScript interface is exposed to set these parameters currently.

It is up to users whether to provide hook functions. If not provided, the default configuration from hyper crate will be used.

Ref #26785

Copy link
Member

@satyarohith satyarohith left a comment

Choose a reason for hiding this comment

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

LGTM

@magurotuna magurotuna merged commit 0e2f6e3 into denoland:main Nov 19, 2024
17 checks passed
@magurotuna magurotuna deleted the magurotuna/deno-fetch-client-builder-hook branch November 19, 2024 01:49
magurotuna added a commit to magurotuna/deno that referenced this pull request Nov 19, 2024
…26909)

This commit makes HTTP client parameters used in `fetch` API
configurable on the extension initialization via a callback
`client_builder_hook` that users can provide.

The main motivation behind this change is to allow `deno_fetch` users to
tune the HTTP/2 client to suit their needs, although Deno CLI users will
not benefit from it as no JavaScript interface is exposed to set these
parameters currently.

It is up to users whether to provide a hook function. If not provided,
the default configuration from hyper crate will be used.

Ref denoland#26785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants