diff --git a/examples/examples/bedrock-runtime/Cargo.toml b/examples/examples/bedrock-runtime/Cargo.toml index 5d7690941e58..b4a3339d507f 100644 --- a/examples/examples/bedrock-runtime/Cargo.toml +++ b/examples/examples/bedrock-runtime/Cargo.toml @@ -6,15 +6,15 @@ edition = "2021" publish = false [dependencies] +aws-config = { version = "1.5.5", path = "../../../sdk/aws-config" } +aws-sdk-bedrockruntime = { version = "1.43.0", path = "../../../sdk/bedrockruntime" } +aws-smithy-runtime-api = { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" } +aws-smithy-types = { version = "1.2.0", path = "../../../sdk/aws-smithy-types" } reqwest = "0.12.5" serde = "1.0.204" serde_json = "1.0.120" tracing = "0.1.40" tracing-subscriber = "0.3.18" -aws-config= { version = "1.5.5", path = "../../../sdk/aws-config" } -aws-sdk-bedrockruntime= { version = "1.43.0", path = "../../../sdk/bedrockruntime" } -aws-smithy-runtime-api= { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" } -aws-smithy-types= { version = "1.2.0", path = "../../../sdk/aws-smithy-types" } [dependencies.tokio] version = "1.38.1" diff --git a/examples/examples/cloudwatchlogs/Cargo.toml b/examples/examples/cloudwatchlogs/Cargo.toml index 0392976628f4..e97d8cd1ff30 100644 --- a/examples/examples/cloudwatchlogs/Cargo.toml +++ b/examples/examples/cloudwatchlogs/Cargo.toml @@ -32,4 +32,4 @@ path = "../../test-utils" version = "0.1.0" [dev-dependencies] -aws-smithy-mocks-experimental= { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" } +aws-smithy-mocks-experimental = { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" } diff --git a/examples/examples/ec2/Cargo.toml b/examples/examples/ec2/Cargo.toml index b80f3843a19c..39ff234e1f8a 100644 --- a/examples/examples/ec2/Cargo.toml +++ b/examples/examples/ec2/Cargo.toml @@ -8,12 +8,12 @@ publish = false [dependencies] tracing = "0.1.40" +aws-smithy-runtime-api = { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" } mockall = "0.13.0" inquire = "0.7.5" reqwest = "0.12.5" -aws-smithy-runtime-api= { version = "1.7.2", path = "../../../sdk/aws-smithy-runtime-api" } -aws-sdk-ssm= { version = "1.42.0", path = "../../../sdk/ssm" } -aws-smithy-async= { version = "1.2.1", path = "../../../sdk/aws-smithy-async" } +aws-sdk-ssm = { version = "1.42.0", path = "../../../sdk/ssm" } +aws-smithy-async = { version = "1.2.1", path = "../../../sdk/aws-smithy-async" } aws-config= { version = "1.5.5", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-sdk-ec2= { version = "1.65.0", path = "../../../sdk/ec2" } aws-types= { version = "1.3.3", path = "../../../sdk/aws-types" } diff --git a/examples/examples/ses/Cargo.toml b/examples/examples/ses/Cargo.toml index 49fff1997f43..c8f14d187581 100644 --- a/examples/examples/ses/Cargo.toml +++ b/examples/examples/ses/Cargo.toml @@ -10,9 +10,9 @@ publish = false anyhow = "1.0.81" tracing = "0.1.40" tmpfile = "0.0.2" +aws-smithy-http = { version = "0.60.9", path = "../../../sdk/aws-smithy-http" } +aws-smithy-mocks-experimental = { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" } open = "5.1.2" -aws-smithy-http= { version = "0.60.9", path = "../../../sdk/aws-smithy-http" } -aws-smithy-mocks-experimental= { version = "0.2.1", path = "../../../sdk/aws-smithy-mocks-experimental" } aws-config= { version = "1.5.5", path = "../../../sdk/aws-config", features = ["behavior-version-latest"] } aws-sdk-sesv2= { version = "1.40.0", path = "../../../sdk/sesv2", features = ["test-util"] } diff --git a/examples/webassembly/src/lib.rs b/examples/webassembly/src/lib.rs index 65ffe27f3f40..fe46bc6587f4 100644 --- a/examples/webassembly/src/lib.rs +++ b/examples/webassembly/src/lib.rs @@ -152,14 +152,15 @@ impl MakeRequestBrowser for BrowserHttpClient { use js_sys::{Array, ArrayBuffer, Reflect, Uint8Array}; use wasm_bindgen_futures::JsFuture; - let mut opts = web_sys::RequestInit::new(); - opts.method(req.method()); - opts.mode(web_sys::RequestMode::Cors); - - let body_pinned = std::pin::Pin::new(req.body().bytes().unwrap()); - if body_pinned.len() > 0 { - let uint_8_array = unsafe { Uint8Array::view(&body_pinned) }; - opts.body(Some(&uint_8_array)); + let opts = web_sys::RequestInit::new(); + opts.set_method(req.method()); + opts.set_mode(web_sys::RequestMode::Cors); + + if let Some(body) = req.body().bytes() { + let body_str = + String::from_utf8(body.into()).map_err(|e| JsValue::from_str(&format!("{e:?}")))?; + let js_body = JsValue::from_str(&body_str); + opts.set_body(&js_body); } let request = web_sys::Request::new_with_str_and_init(req.uri(), &opts)?; diff --git a/versions.toml b/versions.toml index 4ec7da1d1e44..5412011827da 100644 --- a/versions.toml +++ b/versions.toml @@ -1,5 +1,5 @@ smithy_rs_revision = 'c1eeb4eacd8347991b5a7442688b135a67871069' -aws_doc_sdk_examples_revision = '3bd4107474f9fdeac4e54e250506e59f2cc3701f' +aws_doc_sdk_examples_revision = '7a22a0314672afe7c6818fcff083c724c40f4d47' [manual_interventions] crates_to_remove = []