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`. ...@@ -124,12 +124,14 @@ Save the following file as `print_http_body.rb`.
```ruby ```ruby
require 'webrick' require 'webrick'
server = WEBrick::HTTPServer.new(Port: ARGV.first) server = WEBrick::HTTPServer.new(:Port => ARGV.first)
server.mount_proc '/' do |req, res| server.mount_proc '/' do |req, res|
puts req.body puts req.body
end end
trap 'INT' do server.shutdown end trap 'INT' do
server.shutdown
end
server.start 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