Class: WEBrick::HTTPRequest
- Inherits:
-
Object
- Object
- WEBrick::HTTPRequest
- Defined in:
- lib/newjs/jstest.rb
Instance Method Summary collapse
Instance Method Details
#to_json ⇒ Object
194 195 196 197 198 199 |
# File 'lib/newjs/jstest.rb', line 194 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 |