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:
parent
a23f397dab
commit
f3db44b635
@ -530,7 +530,7 @@ nonmax = "0.5"
|
|||||||
smol = "2"
|
smol = "2"
|
||||||
smol-macros = "0.1"
|
smol-macros = "0.1"
|
||||||
smol-hyper = "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]
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
||||||
wasm-bindgen = { version = "0.2" }
|
wasm-bindgen = { version = "0.2" }
|
||||||
|
@ -49,7 +49,7 @@ fn main() -> AnyhowResult<()> {
|
|||||||
let req = BrpRequest {
|
let req = BrpRequest {
|
||||||
jsonrpc: String::from("2.0"),
|
jsonrpc: String::from("2.0"),
|
||||||
method: String::from(BRP_QUERY_METHOD),
|
method: String::from(BRP_QUERY_METHOD),
|
||||||
id: Some(ureq::json!(1)),
|
id: Some(serde_json::to_value(1)?),
|
||||||
params: Some(
|
params: Some(
|
||||||
serde_json::to_value(BrpQueryParams {
|
serde_json::to_value(BrpQueryParams {
|
||||||
data: BrpQuery {
|
data: BrpQuery {
|
||||||
@ -66,7 +66,8 @@ fn main() -> AnyhowResult<()> {
|
|||||||
|
|
||||||
let res = ureq::post(&url)
|
let res = ureq::post(&url)
|
||||||
.send_json(req)?
|
.send_json(req)?
|
||||||
.into_json::<serde_json::Value>()?;
|
.body_mut()
|
||||||
|
.read_json::<serde_json::Value>()?;
|
||||||
|
|
||||||
println!("{:#}", res);
|
println!("{:#}", res);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user