Rust 的 HTTP 模拟库。

时间:2021-06-28 17:54:19
【文件属性】:
文件名称:Rust 的 HTTP 模拟库。
文件大小:86KB
文件格式:ZIP
更新时间:2021-06-28 17:54:19
mock rust test mock-server test-framework 模拟Rust 的 HTTP 模拟库。文档·Crate ·报告错误·请求功能· 更新日志特征简单、富有表现力、流畅的 API。许多内置的帮助程序可以轻松进行请求匹配。并行测试执行。可扩展的请求匹配。具有同步和异步 API 的完全异步核心。调试支持。网络延迟模拟。带有Docker 镜像的独立模式。支持正则表达式匹配、JSON、serde 、cookies 等。入门将httpmock添加到Cargo.toml :[dev-dependencies ]httpmock =" 0.5.5"然后,您可以按如下方式使用httpmock :use httpmock:: MockServer;use httpmock:: Method:: GET;// Start a lightweight mock server.let server= MockServer::start ();// Create a mock on the server.let hello_mock= server.mock (| when, then| { when.method (GET) .path (
【文件预览】:
httpmock-master
----.dockerignore(6B)
----.gitattributes(12B)
----Cargo.toml(1KB)
----src()
--------main.rs(2KB)
--------util.rs(4KB)
--------standalone.rs(4KB)
--------lib.rs(52KB)
--------data.rs(12KB)
--------api()
--------server()
----Dockerfile(794B)
----LICENSE(1KB)
----README.md(5KB)
----azure-pipelines.yml(294B)
----tests()
--------examples()
--------internal()
--------lib.rs(1KB)
--------resources()
----.gitignore(350B)
----CHANGELOG.md(3KB)

网友评论