- 授权协议: GPLv2
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: https://github.com/chrisk/fakeweb
- 官方下载: https://github.com/chrisk/fakeweb
软件介绍
FakeWeb是一个采用Ruby开发的辅助性的用来伪造Web请求的工具,使用它不需要修改代码或编写相应代码。
使用示例:
FakeWeb.register_uri(:get, "http://example.com/test1", :string => "Hello World!") Net::HTTP.get(URI.parse("http://example.com/test1")) => "Hello World!" Net::HTTP.get(URI.parse("http://example.com/test2")) => FakeWeb is bypassed and the response from a real request is returned