提交 82956a03 编写于 作者: S Sytse Sijbrandij

Merge pull request #7798 from spuder/issue#7763

Adds support for ruby 1.8 in webhook example
...@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册