Ruby's body_permitted? method giving “NoMethodError”
问题 I was going through ruby's Net::HTTP class. Every time I run this code from Net::HTTP doc #!/usr/bin/ruby require 'net/http' uri = URI('http://example.com/index.html') res = Net::HTTP.get_response(uri) # Headers res['Set-Cookie'] # => String res.get_fields('set-cookie') # => Array res.to_hash['set-cookie'] # => Array puts "Headers: #{res.to_hash.inspect}" # Status puts res.code # => '200' puts res.message # => 'OK' puts res.class.name # => 'HTTPOK' # Body puts res.body if res.response_body