Commit 82956a03 authored by Sytse Sijbrandij's avatar Sytse Sijbrandij

Merge pull request #7798 from spuder/issue#7763

Adds support for ruby 1.8 in webhook example
parents 24c79205 b9f05087
......@@ -124,12 +124,14 @@ Save the following file as `print_http_body.rb`.
```ruby
require 'webrick'
server = WEBrick::HTTPServer.new(Port: ARGV.first)
server = WEBrick::HTTPServer.new(:Port => ARGV.first)
server.mount_proc '/' do |req, res|
puts req.body
end
trap 'INT' do server.shutdown end
trap 'INT' do
server.shutdown
end
server.start
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment