From c40ac23cf548177066fb1a653a12f8443da3f965 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sat, 23 Jul 2022 12:50:05 +0800 Subject: [PATCH] feat: update container --- .../wit-bindgen-sample/container/src/main.rs | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/__wasm/wit-bindgen-sample/container/src/main.rs b/__wasm/wit-bindgen-sample/container/src/main.rs index 182e856..4def820 100644 --- a/__wasm/wit-bindgen-sample/container/src/main.rs +++ b/__wasm/wit-bindgen-sample/container/src/main.rs @@ -38,18 +38,15 @@ fn main() -> Result<()> { let a = exports.eval_javascript(&mut store, r##" function hi(name) { return "hi: " + name; } let a = []; - // for (let i = 0; i < 12; i++) { - a.push(fetch('https://hatter.ink/util/print_request.action')); - // } - a.push(fetch('https://hatter.ink/ip.action')); - a.push(fetch('https://hatter.ink/ip/ip.jsonp')); - a.push(fetch('https://hatter.ink/ip2.action')); - // for (let i = 0; i < 3; i++) { a.push(i); } - // a.push({ - // id: 1, name: 'hatter' - // }); - // a.push(hi('001')); - // a.push(hi('002')); + a.push(fetch('https://hatter.ink/util/print_request.action')); + a.push(fetch('https://hatter.ink/ip.action')); + a.push(fetch('https://hatter.ink/ip/ip.jsonp')); + a.push(fetch('https://hatter.ink/ip2.action')); + a.push({ + userId: 'id001', + name: 'Test', + }); + JSON.stringify(a) // a "##);