File tree Expand file tree Collapse file tree 6 files changed +20
-19
lines changed
Expand file tree Collapse file tree 6 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ edition = "2021"
66publish = false
77
88[dependencies ]
9+ aws-config = { version = " 1.5.5" , path = " ../../../sdk/aws-config" }
10+ aws-sdk-bedrockruntime = { version = " 1.43.0" , path = " ../../../sdk/bedrockruntime" }
11+ aws-smithy-runtime-api = { version = " 1.7.2" , path = " ../../../sdk/aws-smithy-runtime-api" }
12+ aws-smithy-types = { version = " 1.2.0" , path = " ../../../sdk/aws-smithy-types" }
913reqwest = " 0.12.5"
1014serde = " 1.0.204"
1115serde_json = " 1.0.120"
1216tracing = " 0.1.40"
1317tracing-subscriber = " 0.3.18"
14- aws-config = { version = " 1.5.5" , path = " ../../../sdk/aws-config" }
15- aws-sdk-bedrockruntime = { version = " 1.43.0" , path = " ../../../sdk/bedrockruntime" }
16- aws-smithy-runtime-api = { version = " 1.7.2" , path = " ../../../sdk/aws-smithy-runtime-api" }
17- aws-smithy-types = { version = " 1.2.0" , path = " ../../../sdk/aws-smithy-types" }
1818
1919[dependencies .tokio ]
2020version = " 1.38.1"
Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ path = "../../test-utils"
3232version = " 0.1.0"
3333
3434[dev-dependencies ]
35- aws-smithy-mocks-experimental = { version = " 0.2.1" , path = " ../../../sdk/aws-smithy-mocks-experimental" }
35+ aws-smithy-mocks-experimental = { version = " 0.2.1" , path = " ../../../sdk/aws-smithy-mocks-experimental" }
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ publish = false
88
99[dependencies ]
1010tracing = " 0.1.40"
11+ aws-smithy-runtime-api = { version = " 1.7.2" , path = " ../../../sdk/aws-smithy-runtime-api" }
1112mockall = " 0.13.0"
1213inquire = " 0.7.5"
1314reqwest = " 0.12.5"
14- aws-smithy-runtime-api = { version = " 1.7.2" , path = " ../../../sdk/aws-smithy-runtime-api" }
15- aws-sdk-ssm = { version = " 1.42.0" , path = " ../../../sdk/ssm" }
16- aws-smithy-async = { version = " 1.2.1" , path = " ../../../sdk/aws-smithy-async" }
15+ aws-sdk-ssm = { version = " 1.42.0" , path = " ../../../sdk/ssm" }
16+ aws-smithy-async = { version = " 1.2.1" , path = " ../../../sdk/aws-smithy-async" }
1717aws-config = { version = " 1.5.5" , path = " ../../../sdk/aws-config" , features = [" behavior-version-latest" ] }
1818aws-sdk-ec2 = { version = " 1.65.0" , path = " ../../../sdk/ec2" }
1919aws-types = { version = " 1.3.3" , path = " ../../../sdk/aws-types" }
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ publish = false
1010anyhow = " 1.0.81"
1111tracing = " 0.1.40"
1212tmpfile = " 0.0.2"
13+ aws-smithy-http = { version = " 0.60.9" , path = " ../../../sdk/aws-smithy-http" }
14+ aws-smithy-mocks-experimental = { version = " 0.2.1" , path = " ../../../sdk/aws-smithy-mocks-experimental" }
1315open = " 5.1.2"
14- aws-smithy-http = { version = " 0.60.9" , path = " ../../../sdk/aws-smithy-http" }
15- aws-smithy-mocks-experimental = { version = " 0.2.1" , path = " ../../../sdk/aws-smithy-mocks-experimental" }
1616aws-config = { version = " 1.5.5" , path = " ../../../sdk/aws-config" , features = [" behavior-version-latest" ] }
1717aws-sdk-sesv2 = { version = " 1.40.0" , path = " ../../../sdk/sesv2" , features = [" test-util" ] }
1818
Original file line number Diff line number Diff line change @@ -152,14 +152,15 @@ impl MakeRequestBrowser for BrowserHttpClient {
152152 use js_sys:: { Array , ArrayBuffer , Reflect , Uint8Array } ;
153153 use wasm_bindgen_futures:: JsFuture ;
154154
155- let mut opts = web_sys:: RequestInit :: new ( ) ;
156- opts. method ( req. method ( ) ) ;
157- opts. mode ( web_sys:: RequestMode :: Cors ) ;
158-
159- let body_pinned = std:: pin:: Pin :: new ( req. body ( ) . bytes ( ) . unwrap ( ) ) ;
160- if body_pinned. len ( ) > 0 {
161- let uint_8_array = unsafe { Uint8Array :: view ( & body_pinned) } ;
162- opts. body ( Some ( & uint_8_array) ) ;
155+ let opts = web_sys:: RequestInit :: new ( ) ;
156+ opts. set_method ( req. method ( ) ) ;
157+ opts. set_mode ( web_sys:: RequestMode :: Cors ) ;
158+
159+ if let Some ( body) = req. body ( ) . bytes ( ) {
160+ let body_str =
161+ String :: from_utf8 ( body. into ( ) ) . map_err ( |e| JsValue :: from_str ( & format ! ( "{e:?}" ) ) ) ?;
162+ let js_body = JsValue :: from_str ( & body_str) ;
163+ opts. set_body ( & js_body) ;
163164 }
164165
165166 let request = web_sys:: Request :: new_with_str_and_init ( req. uri ( ) , & opts) ?;
Original file line number Diff line number Diff line change 11smithy_rs_revision = ' c1eeb4eacd8347991b5a7442688b135a67871069'
2- aws_doc_sdk_examples_revision = ' 3bd4107474f9fdeac4e54e250506e59f2cc3701f '
2+ aws_doc_sdk_examples_revision = ' 7a22a0314672afe7c6818fcff083c724c40f4d47 '
33
44[manual_interventions ]
55crates_to_remove = []
You can’t perform that action at this time.
0 commit comments