diff --git a/Cargo.lock b/Cargo.lock index 0401f34..4a1da33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1159,8 +1159,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.5.1" -source = "git+https://github.com/TrueLayer/reqwest-middleware.git#9bedaf84c370da152fa28abb6cbbc1bf0638b635" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc3f1384cffa4f274dad2d4ddd73aed32fed8f786d96c6be8aa4e5fd3c3b58" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 76ed649..a74c4d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ http = "1.4" color-eyre = "0.6" oxigraph = "0.5" 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" tokio = { version = "1", features = ["full"] } tracing = "0.1" \ No newline at end of file diff --git a/ldp/src/resource.rs b/ldp/src/resource.rs index 1f16394..6dee376 100644 --- a/ldp/src/resource.rs +++ b/ldp/src/resource.rs @@ -39,7 +39,7 @@ impl ResourceRequestBuilder { self } - pub fn allow_all_supported_formats(mut self) -> Self { + pub fn allow_only_supported_formats(mut self) -> Self { self.formats = vec![ RdfFormat::N3, RdfFormat::NQuads, @@ -160,6 +160,10 @@ impl Resource { }) } + pub fn format(&self) -> Option { + self.format + } + pub fn into_stream(self) -> impl Stream> { self.response.bytes_stream() }