Ruby 获取 HTTP 回应中的所有 Head 信息

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

require 'uri'
Net::HTTP.get(URI.parse("http://www.oschina.net"))
response = Net::HTTP.get_response('www.oschina.net', '/code/list')


response.each_key { |key| puts key }
# x-cache
# p3p
# content-type
# date
# server
# transfer-encoding