Rails を使用してサーバーに ping を実行しようとしています。私はこれを見つけました
しかし、このコードの実行中にこのエラーが発生し、
require 'net/http'
http = Net::HTTP.new('www.google.com',80)
response = http.request_get('/')
p response.status
エラー:
`<main>': undefined method `status' for #<Net::HTTPFound 302 Found readbody=true> (NoMethodError)
なんで?Google が 302 コードを返すのはなぜですか?? 200じゃないの?