Class: WEBrick::HTTPRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/newjs/jstest.rb

Instance Method Summary collapse

Instance Method Details

#to_jsonObject



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