FakeWeb - HTTP请求调试
GPLv2
跨平台
Ruby
软件简介
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