1 unstable release
0.1.27 | Jul 26, 2024 |
---|
#317 in WebAssembly
53KB
1.5K
SLoC
微信小程序 api wasm 封装
微信小程序 请求使用示例
use wx_mini_api::prelude::*;
#[derive(Default, Serialize, Debug)]
#[serde(rename_all = "kebab-case")]
struct Header {
content_type: String,
}
let header = Header {
content_type: "application/json".to_string(),
};
let req: Request<serde_json::Value, serde_json::Value> = Request {
url: "your_url",
..Default::default()
};
let res: Response<serde_json::Value> = wx_request(req).await.unwrap();
Dependencies
~1.5–4MB
~73K SLoC