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);