Skip to content
Snippets Groups Projects
Commit 82956a03 authored by Sid Sijbrandij's avatar Sid Sijbrandij
Browse files

Merge pull request #7798 from spuder/issue#7763

Adds support for ruby 1.8 in webhook example
parents 24c79205 b9f05087
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
```
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment