mreq

Crates.iomreq
lib.rsmreq
version0.1.16
sourcesrc
created_at2024-06-25 10:36:42.938605
updated_at2024-08-17 13:26:30.032458
descriptionmreq
homepagehttps://github.com/i18n-site/rust/tree/main/mreq
repositoryhttps://github.com/i18n-site/rust.git
max_upload_size
id1283220
size10,539
i18n.site (i18nsite)

documentation

README

mreq

use aok::{Result, OK};
use mreq::Mreq;
use static_init::constructor;
use tracing::info;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[tokio::test]
async fn test() -> Result<()> {
  let mut req = Mreq::new(
    [
      "httpstat.us",
      "jsd.onmicrosoft.cn",
      "cdn.jsdelivr.net",
      "cdn.jsdmirror.com",
    ],
    [],
  );
  let v = req.get("npm/i18md/.v").await?;
  let v = String::from_utf8_lossy(&v);
  info!("1 {}", v);
  let v = req.get("npm/i18md/.v").await?;
  let v = String::from_utf8_lossy(&v);
  info!("2 {}", v);
  // let v = req.get("npm/i18md/.v").await?;
  // let v = String::from_utf8_lossy(&v);
  // info!("{}", v);
  OK
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Commit count: 21

cargo fmt