Can someone point me to good resource for Net::HTTP? I'm trying to understand why certain code functions the way it does. For example:
def url_check(domain)
parsed = URI.parse(domain).host
check = Net::HTTP.new(parsed).head('/').kind_of? Net::HTTPOK
( check == true ? "up" : "down" )
end
I understand 95% of the above code, but I can't find any resources that explain what .head('/')
is doing. I'm hoping someone can point me to a good resource that is beginner friendly.