D
Desingurajan Aswanthaaman
url = URI.parse("http://www.google.com/")
@req = Net::HTTP.new(url.host)
@req.start() do |req|
x = req.head(url.path)
print x
end
It will print
#<Net::HTTPFound:0xe70e30>
From Object x i am not able to get only the result (ie. Not found)
Any methods associate with x to get status code alone.
If there is Some other way to get status code of the url, then also
please reply me...
@req = Net::HTTP.new(url.host)
@req.start() do |req|
x = req.head(url.path)
print x
end
It will print
#<Net::HTTPFound:0xe70e30>
From Object x i am not able to get only the result (ie. Not found)
Any methods associate with x to get status code alone.
If there is Some other way to get status code of the url, then also
please reply me...