Rename function, use latest reqwest-middleware

This commit is contained in:
2026-05-19 15:27:10 -04:00
parent fb542ff82e
commit f29b5af96d
3 changed files with 9 additions and 4 deletions
Generated
+3 -2
View File
@@ -1159,8 +1159,9 @@ dependencies = [
[[package]] [[package]]
name = "reqwest-middleware" name = "reqwest-middleware"
version = "0.5.1" version = "0.5.2"
source = "git+https://github.com/TrueLayer/reqwest-middleware.git#9bedaf84c370da152fa28abb6cbbc1bf0638b635" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07bc3f1384cffa4f274dad2d4ddd73aed32fed8f786d96c6be8aa4e5fd3c3b58"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
+1 -1
View File
@@ -16,7 +16,7 @@ http = "1.4"
color-eyre = "0.6" color-eyre = "0.6"
oxigraph = "0.5" oxigraph = "0.5"
parse_link_header = "0.4" parse_link_header = "0.4"
reqwest-middleware = { git = "https://github.com/TrueLayer/reqwest-middleware.git", features = ["stream"] } reqwest-middleware = { version = "0.5", features = ["stream"] }
thiserror = "2" thiserror = "2"
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
tracing = "0.1" tracing = "0.1"
+5 -1
View File
@@ -39,7 +39,7 @@ impl ResourceRequestBuilder {
self self
} }
pub fn allow_all_supported_formats(mut self) -> Self { pub fn allow_only_supported_formats(mut self) -> Self {
self.formats = vec![ self.formats = vec![
RdfFormat::N3, RdfFormat::N3,
RdfFormat::NQuads, RdfFormat::NQuads,
@@ -160,6 +160,10 @@ impl Resource {
}) })
} }
pub fn format(&self) -> Option<RdfFormat> {
self.format
}
pub fn into_stream(self) -> impl Stream<Item = reqwest_middleware::reqwest::Result<Bytes>> { pub fn into_stream(self) -> impl Stream<Item = reqwest_middleware::reqwest::Result<Bytes>> {
self.response.bytes_stream() self.response.bytes_stream()
} }