2个版本

0.1.0 2024年1月24日
0.1.0-rc12024年1月20日

#132 in HTTP客户端

Download history • Rust 包仓库 7219/week @ 2024-04-23 • Rust 包仓库 7536/week @ 2024-04-30 • Rust 包仓库 7407/week @ 2024-05-07 • Rust 包仓库 9515/week @ 2024-05-14 • Rust 包仓库 10325/week @ 2024-05-21 • Rust 包仓库 10725/week @ 2024-05-28 • Rust 包仓库 10873/week @ 2024-06-04 • Rust 包仓库 13179/week @ 2024-06-11 • Rust 包仓库 13082/week @ 2024-06-18 • Rust 包仓库 14541/week @ 2024-06-25 • Rust 包仓库 21815/week @ 2024-07-02 • Rust 包仓库 31181/week @ 2024-07-09 • Rust 包仓库 32577/week @ 2024-07-16 • Rust 包仓库 28738/week @ 2024-07-23 • Rust 包仓库 29298/week @ 2024-07-30 • Rust 包仓库 24161/week @ 2024-08-06 • Rust 包仓库

121,161每月下载量
用于81个crates (2个直接使用)

Apache-2.0

11KB
125

crates.io license appveyor docs

Hyper-named-pipe:Windows命名管道的Hyper客户端绑定

通过Hyper连接接口,在Tokio的命名管道实现上暴露HTTP接口。

安装

将以下内容添加到您的Cargo.toml文件中

[dependencies]
hyper-named-pipe = "*"

用法

确保在将主机传递给HyperUri时进行十六进制编码,因为这将绕过验证。

let pipe_name = r"\\.\pipe\named-pipe";

let builder = Client::builder(TokioExecutor::new());
let client: Client<NamedPipeConnector, Full<Bytes>> = builder.build(NamedPipeConnector);

let host = hex::encode(pipe_name);
let uri_str = format!("{}://{}", NAMED_PIPE_SCHEME, host);
let url = uri_str.parse().expect("Invalid URI");

async move {
  client.get(url).await.expect("Unable to fetch URL with Hyper client");
};

测试

可以使用cross辅助工具在Unix平台上运行单元测试

cross test --target i686-pc-windows-gnu

依赖项

~5–13MB
~143K SLoC