From f3db44b63554685eb15fe4dccc1a4dfcea89069e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Maita?= <47983254+mnmaita@users.noreply.github.com> Date: Tue, 4 Mar 2025 02:11:28 +0100 Subject: [PATCH] Update ureq requirement from 2.10.1 to 3.0.8 (#18146) # Objective - Closes #18131 ## Solution - Update ureq requirement from 2.10.1 to 3.0.8 and migrate breaking code. --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.toml | 2 +- examples/remote/client.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7bd99fc3a2..0cb5f97e9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -530,7 +530,7 @@ nonmax = "0.5" smol = "2" smol-macros = "0.1" smol-hyper = "0.1" -ureq = { version = "2.10.1", features = ["json"] } +ureq = { version = "3.0.8", features = ["json"] } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen = { version = "0.2" } diff --git a/examples/remote/client.rs b/examples/remote/client.rs index 1188dd0876..4225ce22ab 100644 --- a/examples/remote/client.rs +++ b/examples/remote/client.rs @@ -49,7 +49,7 @@ fn main() -> AnyhowResult<()> { let req = BrpRequest { jsonrpc: String::from("2.0"), method: String::from(BRP_QUERY_METHOD), - id: Some(ureq::json!(1)), + id: Some(serde_json::to_value(1)?), params: Some( serde_json::to_value(BrpQueryParams { data: BrpQuery { @@ -66,7 +66,8 @@ fn main() -> AnyhowResult<()> { let res = ureq::post(&url) .send_json(req)? - .into_json::()?; + .body_mut() + .read_json::()?; println!("{:#}", res);