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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Martín Maita 2025-03-04 02:11:28 +01:00 committed by GitHub
parent a23f397dab
commit f3db44b635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -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" }

View File

@ -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::<serde_json::Value>()?;
.body_mut()
.read_json::<serde_json::Value>()?;
println!("{:#}", res);