README.md in little_sniffer-0.1.1 vs README.md in little_sniffer-0.1.2
- old
+ new
@@ -27,22 +27,16 @@
## Usage
Here's some simple examples to get you started:
```ruby
-require 'http'
+require 'net/http'
require 'little_sniffer'
-class YourHandler
- def handle(data)
- pp data
- end
-end
+handler = proc { |data| puts data }
-handler = YourHandler.new
-
-LittleSniffer.new(handler) do
- HTTP.get('http://example.com/?lang=ruby&author=matz')
+LittleSniffer.new(handler: handler) do
+ Net::HTTP.get(URI('http://example.com/?lang=ruby&author=matz'))
end
# => {:request=>
# {:host=>"example.com",
# :query=>"/?lang=ruby&author=matz",