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

Support setting custom HTTP headers #4446

Closed
waynexia opened this issue Apr 9, 2024 · 6 comments · Fixed by #4447
Closed

Support setting custom HTTP headers #4446

waynexia opened this issue Apr 9, 2024 · 6 comments · Fixed by #4447
Assignees

Comments

@waynexia
Copy link
Member

waynexia commented Apr 9, 2024

This ticket requires a feature that exposes API(s) to allow setting custom HTTP headers for HttpBackend. Or exposes the underlying http_client like #4389

@Xuanwo
Copy link
Member

Xuanwo commented Apr 9, 2024

We now offer an HTTP client builder. Perhaps we could allow direct HTTP client integration, enabling OpenDAL to work with a wider range of HTTP clients.

@Xuanwo
Copy link
Member

Xuanwo commented Apr 9, 2024

We can add a new API called with(client: reqwest::Client) to allow users to build HttpClient via their own client. Would you like to give it a try?

@waynexia
Copy link
Member Author

waynexia commented Apr 9, 2024

Sure, please assign 👍

@Xuanwo
Copy link
Member

Xuanwo commented Apr 9, 2024

By the way, the build API should work for now. Please try add headers in ClientBuilder and pass into http backend.

@zzl221000
Copy link
Contributor

We now offer an HTTP client builder. Perhaps we could allow direct HTTP client integration, enabling OpenDAL to work with a wider range of HTTP clients.

We can add a new API called with(client: reqwest::Client) to allow users to build HttpClient via their own client. Would you like to give it a try?

@Xuanwo
The current method of handling request headers seems incompatible with usage in other language bindings.

@Xuanwo
Copy link
Member

Xuanwo commented Apr 24, 2024

The current method of handling request headers seems incompatible with usage in other language bindings.

Yes, setting custom HTTP headers for other bindings is a seperate feature to support. Would you like to create an issue for this?

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 a pull request may close this issue.

3 participants