https://opendal.apache.org/ logo
I started a new proposal for OpenDAL to simplify t...
# general
x
I started a new proposal for OpenDAL to simplify the usage of `read_with`: https://github.com/apache/incubator-opendal/pull/2299
This proposal will change the API from:
Copy code
rust
let bs = op.read_with(
  "path/to/file",
  OpRead::new()
    .with_range(0..=1024)
    .with_if_match("<etag>")
    .with_if_none_match("<etag>")
    .with_override_cache_control("<cache_control>")
    .with_override_content_disposition("<content_disposition>")
  ).await?;
to
Copy code
rust
let bs = op.read_with("path/to/file")
  .range(0..=1024)
  .if_match("<etag>")
  .if_none_match("<etag>")
  .override_cache_control("<cache_control>")
  .override_content_disposition("<content_disposition>")
  .await?;
What do you think?
Not bad
A real case