1、在https://docs.rs/ 搜尋 hyper , 例子中說 有一個 full client example.
2、github被q, 到https://hub.fastgit.org/hyperium/hyper/blob/master/examples/client.rs 找到了上面提到的例子。
代碼搬運工:main.rs
3.按https://hub.fastgit.org/hyperium/hyper/blob/master/examples/README.md說明,添加依賴 Cargo.toml
生成client.exe
運作 :client.exe 和 client.exe
竟然隻支援http,不支援https
然後在 https://github.com/hyperium/hyper/issues/1025 中找到一些關于https的例子,暫時不想嘗試了。