Class: WEBrick::HTTPRequest
- Inherits:
-
Object
- Object
- WEBrick::HTTPRequest
- Defined in:
- lib/hanoi/webrick.rb
Instance Method Summary collapse
Instance Method Details
#to_json ⇒ Object
30 31 32 33 34 35 |
# File 'lib/hanoi/webrick.rb', line 30 def to_json headers = [] each { |k, v| headers.push "#{k.inspect}: #{v.inspect}" } headers = "{" << headers.join(', ') << "}" %({ "headers": #{headers}, "body": #{body.inspect}, "method": #{request_method.inspect} }) end |