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

[feature] allow specifying custom reqwest client #53

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

digizeph
Copy link
Member

@digizeph digizeph commented Jun 4, 2024

This PR allows oneio::get_http_reader function to take an optional opt_client instead of headers, allowing more flexibility on customizing HTTP reqwest instead of only allowing changing headers.

It is now library users' responsibility to create custom reqwest::blocking::Client for any request customizations.

This PR has a couple of breaking changes:

  1. rename oneio::get_remote_reader to oneio::get_http_reader
  2. rename get_remote_ftp_raw to get_ftp_reader_raw
  3. change signatures of oneio::download, oneio::download_with_retry, oneio::get_http_reader's optional HashMap parameter for headers to optional reqwest::blocking::Client.

This PR resolves issue #52

This commit allows oneio::get_http_reader function to take an optional
opt_client instead of headers, allowing more flexibility on customizing
HTTP reqwest instead of only allowing changing headers.

It is now library users' responsibility to create custom
`reqwest::blocking::Client` for any request customizations.

This commit has a couple of breaking changes:
1. rename `oneio::get_remote_reader` to `oneio::get_http_reader`
2. rename `get_remote_ftp_raw` to `get_ftp_reader_raw`
3. change signatures of `oneio::download`, `oneio::download_with_retry`,
`oneio::get_http_reader`'s optional HashMap parameter for headers to
optional `reqwest::blocking::Client`.
@digizeph digizeph merged commit 88714ee into main Jun 4, 2024
1 check passed
@digizeph digizeph deleted the feature/custom-client branch June 4, 2024 20:07
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.

1 participant