cloud-storage-rs
cloud-storage-rs copied to clipboard
Add ClientBuilder and support a configureable reqwest client
cloud-storage-rs uses a default Reqwest client as its internal http client. Reqwest offers a large set of configuration that are inaccessible to cloud-storage-rs users.
This PR adds a ClientBuilder struct which enables to customize reqwest client
Example usage:
let builder = Client::builder();
let custom_client = reqwest::Client::builder()
.timeout(core::time::Duration::from_secs(10))
.build()?;
let client = builder.with_reqwest_client(custom_client).build();
There are many use cases for providing a custom client:
- configuring proxy servers
- configuring timeouts, keepalive settings
- configuring custom http2 optimizations, or opt out to http1