require 'net/http'
require 'uri'
url_src='http://fs.fangjia.com/trend/quarterData?defaultCityName=%E4%BD%9B%E5%B1%B1'
url = URI.parse(url_src)
httpcall = Net::HTTP.new(url.host, url.port)
resp, data = httpcall.get(url.path)
#puts resp.code
puts data
这个打打印为空
但是用 open-url puts open(url_src).read 就能打印出内容
上面的代码哪里出错了?