1个不稳定版本

0.0.1 2020年1月19日

#8#scrappy

Download history 29/week @ 2024-03-24 64/week @ 2024-03-31 18/week @ 2024-04-07 24/week @ 2024-04-14 27/week @ 2024-04-21 18/week @ 2024-04-28 19/week @ 2024-05-05 26/week @ 2024-05-12 18/week @ 2024-05-19 27/week @ 2024-05-26 30/week @ 2024-06-02 13/week @ 2024-06-09 17/week @ 2024-06-16 21/week @ 2024-06-23 6/week @ 2024-06-30 7/week @ 2024-07-07

52 每月下载次数
9 个crate中(直接使用2个) 使用

MIT 协议

1MB
27K SLoC

HTTP客户端

use futures::future::{lazy, Future};
use scrappy_rt::System;
use scrappy_client::Client;

#[scrappy_rt::main]
async fn main() {
   let mut client = Client::default();

   let response = client.get("https://www.rust-lang.net.cn") // <- Create request builder
       .header("User-Agent", "scrappy-web")
       .send()                             // <- Send http request
       .await;

    println!("Response: {:?}", response);
}

依赖关系

~21–28MB
~595K SLoC